Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, April 19, 2024

Diff for phpMyEdit/phpMyEdit.class.php between version 1.136 and 1.137

version 1.136, 2004/04/18 14:17:07 version 1.137, 2004/04/18 17:23:34
Line 19 
Line 19 
  * http://platon.sk/projects/phpMyEdit/   * http://platon.sk/projects/phpMyEdit/
  */   */
   
 /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.135 2004/04/17 11:35:48 nepto Exp $ */  /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.136 2004/04/18 14:17:07 nepto Exp $ */
   
 /*  This is a generic table editing program. The table and fields to be  /*  This is a generic table editing program. The table and fields to be
         edited are defined in the calling program.          edited are defined in the calling program.
Line 519  class phpMyEdit
Line 519  class phpMyEdit
   
         function create_join_clause() /* {{{ */          function create_join_clause() /* {{{ */
         {          {
                 $tbs[]       = $this->tb;  
                 $main_table  = 'PMEtable0';                  $main_table  = 'PMEtable0';
                 $join_clause = $this->tb." AS $main_table";                  $join_clause = $this->tb." AS $main_table";
                 for ($k = 0, $numfds = sizeof($this->fds); $k < $numfds; $k++) {                  for ($k = 0, $numfds = sizeof($this->fds); $k < $numfds; $k++) {
Line 534  class phpMyEdit
Line 533  class phpMyEdit
                         $join_desc   = @$this->fdd[$main_column]['values']['description'];                          $join_desc   = @$this->fdd[$main_column]['values']['description'];
                         if ($join_desc != '' && $join_column != '') {                          if ($join_desc != '' && $join_column != '') {
                                 $join_table = 'PMEjoin'.$k;                                  $join_table = 'PMEjoin'.$k;
                                 if (! in_array($join_table, $tbs)) {                                  $ar = array(
                                         $ar = array(                                                  'main_table'       => $main_table,
                                                         'main_table'       => $main_table,                                                  'main_column'      => $main_column,
                                                         'main_column'      => $main_column,                                                  'join_table'       => $join_table,
                                                         'join_table'       => $join_table,                                                  'join_column'      => $join_column,
                                                         'join_column'      => $join_column,                                                  'join_description' => $join_desc);
                                                         'join_description' => $join_desc);                                  $join_clause .= " LEFT OUTER JOIN $db.$table AS $join_table ON ";
                                         $join_clause .= " LEFT OUTER JOIN $db.$table AS $join_table ON ";                                  $join_clause .= isset($this->fdd[$main_column]['values']['join'])
                                         $join_clause .= isset($this->fdd[$main_column]['values']['join'])                                          ? $this->substituteVars($this->fdd[$main_column]['values']['join'], $ar)
                                                 ? $this->substituteVars($this->fdd[$main_column]['values']['join'], $ar)                                          : "$join_table.$join_column = $main_table.$main_column";
                                                 : "$join_table.$join_column = $main_table.$main_column";  
                                         $tbs[] = $join_table;  
                                 }  
                         }                          }
                 }                  }
                 return $join_clause;                  return $join_clause;

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.137

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top