#30656 [Opn->Bgs]: mysqli_prepare returns "Unknown command"

From: Date: Tue, 30 Nov 2004 11:36:56 +0000
Subject: #30656 [Opn->Bgs]: mysqli_prepare returns "Unknown command"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69642@lists.php.net to get a copy of this message
ID: 30656 Updated by: georg@php.net Reported By: dan at yes dot lt -Status: Open +Status: Bogus Bug Type: MySQLi related Operating System: Windows 2000 PHP Version: 5.0.2 New Comment: Unknown command means that you connect to a MySQL server < 4.1 which doesn't support prepared statements. Previous Comments: ------------------------------------------------------------------------ [2004-11-02 10:00:08] dan at yes dot lt Description: ------------ mysqli_prepare() and mysqli->prepare() returns "Unknown command" error. I have tryed that with MySQL versions 4.1.5, 5.0.0a and 5.0.1. The result was just the same. Reproduce code: --------------- $db = new mysqli(HOSTNAME, USERNAME, PASSWORD, DATABASE); $st = $db->prepare("SELECT id, name FROM test WHERE name = ?"); if (!$st) echo $db->error; // "Unknown command" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30656&edit=1

« previous php.bugs (#69642) next »