cvs: pear /DB package.xml /DB/DB fbsql.php mysql.php mysqli.php sqlite.php

From: Date: Wed, 28 Apr 2004 20:13:10 +0000
Subject: cvs: pear /DB package.xml /DB/DB fbsql.php mysql.php mysqli.php sqlite.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-18905@lists.php.net to get a copy of this message
danielc Wed Apr 28 16:13:10 2004 EDT Modified files: /pear/DB package.xml /pear/DB/DB fbsql.php mysql.php mysqli.php sqlite.php Log: Explicitly name 'id' column when performing inserts for sequence methods. http://cvs.php.net/diff.php/pear/DB/package.xml?r1=1.98&r2=1.99&ty=u Index: pear/DB/package.xml diff -u pear/DB/package.xml:1.98 pear/DB/package.xml:1.99 --- pear/DB/package.xml:1.98 Wed Apr 28 15:58:29 2004 +++ pear/DB/package.xml Wed Apr 28 16:13:10 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> <package version="1.0"> - <!-- $Id: package.xml,v 1.98 2004/04/28 19:58:29 danielc Exp $ --> + <!-- $Id: package.xml,v 1.99 2004/04/28 20:13:10 danielc Exp $ --> <name>DB</name> <summary>Database Abstraction Layer</summary> <description> @@ -68,6 +68,10 @@ ============= BUGS FIXED: +- fbsql, mysql, mysqli, sqlite: +Explicitly name 'id' column when performing +inserts for sequence methods. (danielc) + - common: Fix docblocks for getAssoc() and limitQuery(). (danielc) http://cvs.php.net/diff.php/pear/DB/DB/fbsql.php?r1=1.33&r2=1.34&ty=u Index: pear/DB/DB/fbsql.php diff -u pear/DB/DB/fbsql.php:1.33 pear/DB/DB/fbsql.php:1.34 --- pear/DB/DB/fbsql.php:1.33 Thu Mar 4 20:46:53 2004 +++ pear/DB/DB/fbsql.php Wed Apr 28 16:13:10 2004 @@ -17,7 +17,7 @@ // | Maintainer: Daniel Convissor <danielc@php.net> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.33 2004/03/05 01:46:53 danielc Exp $ +// $Id: fbsql.php,v 1.34 2004/04/28 20:13:10 danielc Exp $ // XXX legend: @@ -37,7 +37,7 @@ * extension. * * @package DB - * @version $Id: fbsql.php,v 1.33 2004/03/05 01:46:53 danielc Exp $ + * @version $Id: fbsql.php,v 1.34 2004/04/28 20:13:10 danielc Exp $ * @category Database * @author Frank M. Kromann <frank@frontbase.com> */ @@ -409,7 +409,7 @@ $seqname = $this->getSequenceName($seq_name); $repeat = 0; do { - $result = $this->query("INSERT INTO ${seqname} VALUES(NULL)"); + $result = $this->query("INSERT INTO ${seqname} (id) VALUES (NULL)"); if ($ondemand && DB::isError($result) && $result->getCode() == DB_ERROR_NOSUCHTABLE) { $repeat = 1; http://cvs.php.net/diff.php/pear/DB/DB/mysql.php?r1=1.71&r2=1.72&ty=u Index: pear/DB/DB/mysql.php diff -u pear/DB/DB/mysql.php:1.71 pear/DB/DB/mysql.php:1.72 --- pear/DB/DB/mysql.php:1.71 Wed Apr 7 00:56:58 2004 +++ pear/DB/DB/mysql.php Wed Apr 28 16:13:10 2004 @@ -17,7 +17,7 @@ // | Maintainer: Daniel Convissor <danielc@php.net> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.71 2004/04/07 04:56:58 danielc Exp $ +// $Id: mysql.php,v 1.72 2004/04/28 20:13:10 danielc Exp $ // XXX legend: @@ -39,7 +39,7 @@ * This is for MySQL versions 4.0 and below. * * @package DB - * @version $Id: mysql.php,v 1.71 2004/04/07 04:56:58 danielc Exp $ + * @version $Id: mysql.php,v 1.72 2004/04/28 20:13:10 danielc Exp $ * @category Database * @author Stig Bakken <ssb@php.net> */ @@ -520,7 +520,7 @@ } // add the default value - $result = $this->query("REPLACE INTO ${seqname} VALUES (0)"); + $result = $this->query("REPLACE INTO ${seqname} (id) VALUES (0)"); if (DB::isError($result)) { return $this->raiseError($result); } @@ -585,7 +585,7 @@ return $res; } // insert yields value 1, nextId call will generate ID 2 - $res = $this->query("INSERT INTO ${seqname} VALUES(0)"); + $res = $this->query("INSERT INTO ${seqname} (id) VALUES (0)"); if (DB::isError($res)) { return $res; } http://cvs.php.net/diff.php/pear/DB/DB/mysqli.php?r1=1.15&r2=1.16&ty=u Index: pear/DB/DB/mysqli.php diff -u pear/DB/DB/mysqli.php:1.15 pear/DB/DB/mysqli.php:1.16 --- pear/DB/DB/mysqli.php:1.15 Sat Apr 17 15:43:39 2004 +++ pear/DB/DB/mysqli.php Wed Apr 28 16:13:10 2004 @@ -18,7 +18,7 @@ // | Maintainer: Daniel Convissor <danielc@php.net> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.15 2004/04/17 19:43:39 danielc Exp $ +// $Id: mysqli.php,v 1.16 2004/04/28 20:13:10 danielc Exp $ // EXPERIMENTAL @@ -35,7 +35,7 @@ * Note that persistent connections no longer exist. * * @package DB - * @version $Id: mysqli.php,v 1.15 2004/04/17 19:43:39 danielc Exp $ + * @version $Id: mysqli.php,v 1.16 2004/04/28 20:13:10 danielc Exp $ * @category Database * @author Chaillan Nicolas <nicos@php.net> */ @@ -514,7 +514,7 @@ } // add the default value - $result = $this->query("REPLACE INTO ${seqname} VALUES (0)"); + $result = $this->query("REPLACE INTO ${seqname} (id) VALUES (0)"); if (DB::isError($result)) { return $this->raiseError($result); } @@ -579,7 +579,7 @@ return $res; } // insert yields value 1, nextId call will generate ID 2 - return $this->query("INSERT INTO ${seqname} VALUES(0)"); + return $this->query("INSERT INTO ${seqname} (id) VALUES (0)"); } // }}} http://cvs.php.net/diff.php/pear/DB/DB/sqlite.php?r1=1.65&r2=1.66&ty=u Index: pear/DB/DB/sqlite.php diff -u pear/DB/DB/sqlite.php:1.65 pear/DB/DB/sqlite.php:1.66 --- pear/DB/DB/sqlite.php:1.65 Wed Apr 7 00:56:58 2004 +++ pear/DB/DB/sqlite.php Wed Apr 28 16:13:10 2004 @@ -18,7 +18,7 @@ // | Maintainer: Daniel Convissor <danielc@php.net> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.65 2004/04/07 04:56:58 danielc Exp $ +// $Id: sqlite.php,v 1.66 2004/04/28 20:13:10 danielc Exp $ require_once 'DB/common.php'; @@ -27,7 +27,7 @@ * PECL extension. * * @package DB - * @version $Id: sqlite.php,v 1.65 2004/04/07 04:56:58 danielc Exp $ + * @version $Id: sqlite.php,v 1.66 2004/04/28 20:13:10 danielc Exp $ * @category Database * @author Urs Gehrig <urs@circle.ch> * @author Mika Tuupola <tuupola@appelsiini.net> @@ -468,7 +468,7 @@ do { $repeat = 0; $this->pushErrorHandling(PEAR_ERROR_RETURN); - $result = $this->query("INSERT INTO $seqname VALUES (NULL)"); + $result = $this->query("INSERT INTO $seqname (id) VALUES (NULL)"); $this->popErrorHandling(); if ($result === DB_OK) { $id = @sqlite_last_insert_rowid($this->connection);

« previous php.pear.cvs (#18905) next »