#29530 [Opn]: mysqli->prepare() Error (00000/1047)

From: Date: Thu, 05 Aug 2004 09:51:33 +0000
Subject: #29530 [Opn]: mysqli->prepare() Error (00000/1047)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-64120@lists.php.net to get a copy of this message
ID: 29530 User updated by: chenxi at shine dot com dot cn Reported By: chenxi at shine dot com dot cn Status: Open Bug Type: MySQL related Operating System: Redhat Linux 9 PHP Version: 5.0.0 New Comment: i make a mistake: $stmt = $mysqli->prepare("SELECT id, name FROM program") Previous Comments: ------------------------------------------------------------------------ [2004-08-05 11:50:07] chenxi at shine dot com dot cn 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 this bug report at http://bugs.php.net/?id=29530&edit=1

« previous php.bugs (#64120) next »