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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 24 03:03:35 2021 UTC