Update of /cvsroot/phpvortex/phpvortex
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4789
Modified Files:
DB_Base.class.php
Log Message:
Fixed some bugs and added some debug information (lvl 3) to DB_Base
Index: DB_Base.class.php
===================================================================
RCS file: /cvsroot/phpvortex/phpvortex/DB_Base.class.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DB_Base.class.php 30 Sep 2004 14:26:00 -0000 1.6
--- DB_Base.class.php 30 Sep 2004 19:29:57 -0000 1.7
***************
*** 97,104 ****
$vl = '';
foreach($values as $f => $v) {
! $fl = (strlen($fl)?', ':'') . $f;
! $vl = (strlen($vl)?', ':'') . $v;
}
$sql = "INSERT INTO $table ($fl) VALUES ($vl)";
return $this->Query($sql);
}
--- 97,105 ----
$vl = '';
foreach($values as $f => $v) {
! $fl .= (strlen($fl)?', ':'') . $f;
! $vl .= (strlen($vl)?', ':'') . $v;
}
$sql = "INSERT INTO $table ($fl) VALUES ($vl)";
+ dv(3, 'INSERT SQL', $sql);
return $this->Query($sql);
}
***************
*** 116,122 ****
$sl = '';
foreach($values as $f => $v) {
! $sl = (strlen($sl)?', ':'') . "$f = $v";
}
$sql = "UPDATE $table SET $sl WHERE $where";
return $this->Query($sql);
}
--- 117,124 ----
$sl = '';
foreach($values as $f => $v) {
! $sl .= (strlen($sl)?', ':'') . "$f = $v";
}
$sql = "UPDATE $table SET $sl WHERE $where";
+ dv(3, 'UPDATE SQL', $sql);
return $this->Query($sql);
}
***************
*** 132,135 ****
--- 134,138 ----
{
$sql = "DELETE FROM $table WHERE $where";
+ dv(3, 'DELETE SQL', $sql);
return $this->Query($sql);
}
|