| version 1.52, 2003/02/18 00:21:11 |
version 1.53, 2003/03/04 23:58:43 |
|
|
| * http://www.platon.sk/projects/phpMyEdit/ |
* http://www.platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.51 2003/02/17 21:15:58 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.52 2003/02/18 00:21:11 nepto Exp $ */ |
| |
|
| /* phpMyEdit intro {{{ */ |
/* phpMyEdit intro {{{ */ |
| /* |
/* |
|
|
| global $debug_query; |
global $debug_query; |
| if ($debug_query || $debug) { |
if ($debug_query || $debug) { |
| $line = intval($line); |
$line = intval($line); |
| echo '<h4>MySQL query at line '.$line.'</h4>'.htmlspecialchars($qry).'<hr>'."\n"; |
echo '<h4>MySQL query at line ',$line,'</h4>',htmlspecialchars($qry),'<hr>',"\n"; |
| } |
} |
| $this->elog("qry: $qry",$line); |
|
| $ret = @mysql_db_query($this->db, $qry, $this->dbh); |
$ret = @mysql_db_query($this->db, $qry, $this->dbh); |
| if (! $ret) { |
if (! $ret) { |
| $this->elog(mysql_errno($this->dbh).': '.mysql_error($this->dbh).' in '.$qry, __LINE__); |
echo '<h4>MySQL error ',mysql_errno($this->dbh),'</h4>'; |
| |
echo htmlspecialchars(mysql_error($this->dbh)),'<hr>',"\n"; |
| } |
} |
| return $ret; |
return $ret; |
| } /* }}} */ |
} /* }}} */ |
|
|
| } |
} |
| } /* }}} */ |
} /* }}} */ |
| |
|
| function elog($str,$line) /* {{{ */ |
|
| { |
|
| error_log(__FILE__.":$line::\n$str",0); |
|
| return true; |
|
| } /* }}} */ |
|
| |
|
| function make_language_labels($language) /* {{{ */ |
function make_language_labels($language) /* {{{ */ |
| { |
{ |
| // just try the first language and variant |
// just try the first language and variant |
| Line 2031 function phpMyEdit_form_control(theForm) |
|
| Line 2025 function phpMyEdit_form_control(theForm) |
|
| $qp['from'] = $this->create_join_clause (); |
$qp['from'] = $this->create_join_clause (); |
| $qp['where'] = $this->make_where_from_query_opts(); |
$qp['where'] = $this->make_where_from_query_opts(); |
| $tot_query = $this->query_make($qp); |
$tot_query = $this->query_make($qp); |
| //$this->elog('TOT_QRY: '.$tot_query,__LINE__); |
|
| $totals_result = $this->myquery($tot_query,__LINE__); |
$totals_result = $this->myquery($tot_query,__LINE__); |
| $tot_row = @mysql_fetch_array($totals_result, MYSQL_ASSOC); |
$tot_row = @mysql_fetch_array($totals_result, MYSQL_ASSOC); |
| //} |
//} |