From:             chenxi at shine dot com dot cn
Operating system: Redhat Linux 9
PHP version:      5.0.0
PHP Bug Type:     MySQL related
Bug description:  mysqli->prepare()  Error (00000/1047)

Description:
------------
give me following error message:
Warning: mysqli_prepare() [function.mysqli-prepare]: Error (00000/1047):
Unknown command in /shine/htdocs/test.php on line 16

Reproduce code:
---------------
$mysqli = new mysqli("localhost", "root", "root", "hotel");
if (mysqli_connect_errno()) {
   printf("Connect failed: %s\n", mysqli_connect_error());
   exit();
}
        
if ($stmt = $mysqli->prepare($link, "SELECT id, name FROM program")) {
   $stmt->execute();

   $stmt->bind_result($col1, $col2);

   while ($stmt->fetch()) {
      printf("%i %s\n", $col1, $col2);
   }

   $stmt->close();
} else {
   print "stmt failed<br/>";
}


-- 
Edit bug report at http://bugs.php.net/?id=29530&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29530&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29530&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29530&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29530&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29530&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29530&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29530&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29530&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29530&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29530&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29530&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29530&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29530&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29530&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29530&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29530&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29530&r=float

Reply via email to