[Phplib-commit] CVS: php-lib-stable/php ct_sql.inc,1.5,1.6
Brought to you by:
nhruby,
richardarcher
From: Layne W. <lay...@us...> - 2005-02-19 15:19:44
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6334/php Modified Files: ct_sql.inc Log Message: name count column in query, $db->f("count") instead of $db->f(0) Index: ct_sql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/ct_sql.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ct_sql.inc 19 Mar 2002 22:28:58 -0000 1.5 --- ct_sql.inc 19 Feb 2005 15:19:35 -0000 1.6 *************** *** 81,85 **** $id, $name); ! $squery = sprintf("select count(*) from %s where val='%s' and changed='%s' and sid='%s' and name='%s'", $this->database_table, $str, --- 81,85 ---- $id, $name); ! $squery = sprintf("select count(sid) count from %s where val='%s' and changed='%s' and sid='%s' and name='%s'", $this->database_table, $str, *************** *** 109,113 **** if ( $this->db->affected_rows() == 0 && $this->db->query($squery) ! && $this->db->next_record() && $this->db->f(0) == 0 && !$this->db->query($iquery)) { --- 109,113 ---- if ( $this->db->affected_rows() == 0 && $this->db->query($squery) ! && $this->db->next_record() && $this->db->f("count") == 0 && !$this->db->query($iquery)) { |