php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30656 mysqli_prepare returns "Unknown command"
Submitted: 2004-11-02 10:00 UTC Modified: 2004-11-30 12:36 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: dan at yes dot lt Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.0.2 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dan at yes dot lt
New email:
PHP Version: OS:

 

 [2004-11-02 10:00 UTC] 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"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-30 12:36 UTC] georg@php.net
Unknown command means that you connect to a MySQL server < 
4.1 which doesn't support prepared statements. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 10:01:31 2024 UTC