From: <tr...@us...> - 2002-09-08 22:37:29
|
Update of /cvsroot/basedb/basedb/www In directory usw-pr-cvs1:/tmp/cvs-serv25321 Modified Files: mysql.inc.php pgsql.inc.php Log Message: re-added multiinsert Index: mysql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/mysql.inc.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mysql.inc.php 8 Sep 2002 18:05:24 -0000 1.7 --- mysql.inc.php 8 Sep 2002 22:37:25 -0000 1.8 *************** *** 180,184 **** } ! /*function db_multiinsert_begin($table, $columns) { $res = array($table, $columns, array()); --- 180,184 ---- } ! function db_multiinsert_begin($table, $columns) { $res = array($table, $columns, array()); *************** *** 205,209 **** return -1; return mysql_affected_rows(); ! }*/ function db_tabfile_load($filename, $table, $columns) --- 205,209 ---- return -1; return mysql_affected_rows(); ! } function db_tabfile_load($filename, $table, $columns) Index: pgsql.inc.php =================================================================== RCS file: /cvsroot/basedb/basedb/www/pgsql.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pgsql.inc.php 8 Sep 2002 14:50:02 -0000 1.3 --- pgsql.inc.php 8 Sep 2002 22:37:25 -0000 1.4 *************** *** 36,40 **** "dbname = '".addslashes($database)."'"; $this->serv = pg_pconnect($cstring) ! or die("pg_pconnect() failed: ".pg_last_error()."\n"); } --- 36,40 ---- "dbname = '".addslashes($database)."'"; $this->serv = pg_pconnect($cstring) ! or die("pg_pconnect() failed: ".pg_last_error()); } [...220 lines suppressed...] + } + else if($s == 1) + { + if($c == "'") $s = 0; + else if($c == "\\") $s = 2; + $q2 .= $c; + } + else + { + $s = 1; + $q2 .= $c; + } + } + if($s != 0) + { + error_log("db_pgsql_requote: error in query string (final state: ". + ($s == 1 ? "quoted" : "backslashed").")"); + } } |