#41218 [NEW]: mysql_query

From: Date: Sat, 28 Apr 2007 06:13:06 +0000
Subject: #41218 [NEW]: mysql_query
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-112018@lists.php.net to get a copy of this message
From: dailu at mail dot ru Operating system: Windows XP Pro PHP version: 5.2.1 PHP Bug Type: MySQL related Bug description: mysql_query Description: ------------ Table is empty. I insert one record in table. In spite that table contain two equal records, although at output record is single. I used mysql 5.0.20. P.S.: I'm from Russia, sorry for my english.. Reproduce code: --------------- mysql_connect('localhost', 'root', NULL); mysql_select_db('localhost'); echo ' Before:<br/>'; $result = mysql_query('SELECT * FROM documents'); while($array = mysql_fetch_assoc($result)) printf('%d.%d %s<br/>', $array['id'], $array['id_branch'], $array['name']); // Table is empty mysql_query("INSERT INTO documents (id,id_branch,name) VALUES (NULL, 1, 'Record2')"); echo ' After:<br/>'; $result = mysql_query('SELECT * FROM documents'); while($array = mysql_fetch_assoc($result)) printf('%d.%d %s<br/>', $array['id'], $array['id_branch'], $array['name']); Expected result: ---------------- Before: After: 1.1 Record2 -- Edit bug report at http://bugs.php.net/?id=41218&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41218&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41218&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41218&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41218&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41218&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41218&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41218&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41218&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41218&r=support Expected behavior: http://bugs.php.net/fix.php?id=41218&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41218&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41218&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41218&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41218&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41218&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41218&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41218&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41218&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41218&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41218&r=mysqlcfg

« previous php.bugs (#112018) next »