php.net |  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
 [2006-03-06 16:07 UTC] ludvig dot ericson at gmail dot com
Description:
------------
When I run this code: http://nopaste.php-q.net/196469 (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\UserSystem.inc.php 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\UserSystem.inc.php 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:
http://nopaste.php-q.net/196448
and therefore seemingly transparent in this case.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-08 14:55 UTC] georg@php.net
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 Nov 03 14:01:29 2024 UTC