From:             georgehubert3 at hotmail dot com
Operating system: FreeBSD 4.7-RELEASE #0
PHP version:      4.3.1
PHP Bug Type:     MySQL related
Bug description:  2 rows added from mysql_query insert command

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 bug report at http://bugs.php.net/?id=22363&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22363&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22363&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22363&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22363&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22363&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22363&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22363&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22363&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22363&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22363&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22363&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22363&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22363&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22363&r=gnused

Reply via email to