#22363 [Opn]: 2 rows added from mysql_query insert command
| From: | georgehubert3 at hotmail dot com | Date: | Fri, 21 Feb 2003 21:10:38 +0000 |
| Subject: | #22363 [Opn]: 2 rows added from mysql_query insert command | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-33871@lists.php.net to get a copy of this message | ||
ID: 22363
User updated by: georgehubert3 at hotmail dot com
Reported By: georgehubert3 at hotmail dot com
Status: Open
Bug Type: MySQL related
Operating System: FreeBSD 4.7-RELEASE #0
PHP Version: 4.3.1
New Comment:
The Odd/Even info does not happen 100%. Two rows are always added to
the table.
Previous Comments:
------------------------------------------------------------------------
[2003-02-21 15:05:06] georgehubert3 at hotmail dot com
Trying to insert data from a posted form into mysql 3.23.42
creates a blank record and then the correct record (2 records total).
Only happens if number of records in table is even (i.e. 2 records, 4
records, etc.). If number of records in database is odd then the query
correctly inserts only one record. I can reproduce this 100%. Contact
me to see it in action and view scripts.
$query = "INSERT INTO Ads SET CompanyName = '$CompanyName', WebSite =
'$WebSite', Text = '$Text', StartDate = '$StartDate', EndDate =
'$EndDate', Notes = '$Notes', Extension = '$Extension'";
$result = mysql_query($query);
Compiled Options:
'./configure' '--with-apxs=/hsphere/shared/apache/bin/apxs'
'--with-zip' '--with-bz2' '--with-zlib-dir'
'--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local'
'--with-gd=/hsphere/shared' '--with-mysql=/usr/local'
'--with-gettext=/usr/local' '--disable-debug' '--enable-versioning'
'--enable-sockets' '--enable-track-vars' '--with-imap=/hsphere/shared'
'--with-pgsql=/usr/local' '--enable-ftp'
'--localstatedir=/var/hsphere/php' '--enable-trans-sid'
'--without-curl' '--with-mcrypt' '--with-dom'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22363&edit=1