|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36631 Prepared statements failing with no apparent reason
Submitted: 2006-03-06 16:07 UTC Modified: 2006-03-16 01:00 UTC
From: ludvig dot ericson at gmail dot com Assigned: georg (profile)
Status: No Feedback Package: MySQLi related
PHP Version: 5CVS-2006-03-06 (snap) OS: Windows XP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-03-06 16:07 UTC] ludvig dot ericson at gmail dot com
When I run this code: (I removed the LIMIT on line 48 too)
I get two warnings:

Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement in C:\Web\Apache\lnkrec\core\ on line 50

Warning: mysqli_stmt::bind_result() [function.bind-result]: Number of bind variables doesn't match number of fields in prepared statement. in C:\Web\Apache\lnkrec\core\ on line 52

I'm thinking this is really weird since the amount of parameters are just as many as there should be.

I have tested my MySQL query outside PHP, and it works fine syntactically.

Futhermore, $stmt->param_count is 0.

The Database class is defined as:
and therefore seemingly transparent in this case.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-08 14:55 UTC]
Please provide a *short* reproducable testcase (including your table definition) and also the version numbers of libmysql and MySQL Server.
 [2006-03-16 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 16:01:27 2024 UTC