Bug #31510 [Com]: sqlite_key function only exists as method for SQLiteResult class
Edit report at http://bugs.php.net/bug.php?id=31510edit=1 ID: 31510 Comment by: php at trafex dot nl Reported by:irch...@php.net Summary:sqlite_key function only exists as method for SQLiteResult class Status: Wont fix Type: Bug Package:SQLite related PHP Version:* Assigned To:helly Block user comment: N Private report: N New Comment: Maybe the documentation should be updated, it doesn't mention any of this. Previous Comments: [2005-04-12 23:14:01] he...@php.net All QLite maintainers decided there is little to no usa in that function. The reason there is SQLiteResult::key() is only because SQLiteResult implements Iterator. [2005-01-12 09:31:58] irch...@php.net Description: The function sqlite_key (line 2637 of ext/sqlite/sqlite.c) only exists as a mapped method of the SQLiteResult class and cannot be used a a procedural function as it has no entry in the sqlite_funcs function table (even though the function has support for being called as such). All that's needed is an entry in sqlite_functions[]. -- Edit this bug report at http://bugs.php.net/bug.php?id=31510edit=1
#31037 [NoF-Opn]: MySQLi - bind_param
ID: 31037 User updated by: php at trafex dot nl Reported By: php at trafex dot nl -Status: No Feedback +Status: Open Bug Type: MySQLi related Operating System: Fedora core 1 -PHP Version: 5.0.2 +PHP Version: 5.0.4 New Comment: I've tested it again with the these versions: - PHP version 5.04-cvs (snapshot of 4 march 05) - MySQL version 4.1.10 And again the same error. Previous Comments: [2005-02-12 01:00:07] 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. [2005-02-04 16:25:27] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Please also upgrade your mysql server and client library to 4.1.9 [2004-12-09 12:20:36] php at trafex dot nl Oke i've edited the script you gave for my database. This script do i use now: Code: ?php $mysql = new mysqli(localhost, , , test); printf(Client version: %s\n, $mysql-client_version); printf(Server version: %s\n, $mysql-server_version); $mysql-query(DROP TABLE IF EXISTS temp_table); $mysql-query(CREATE TABLE temp_table(username varchar(20), user_id int)); $mysql-query(INSERT INTO temp_table VALUES ('foo', 1)); if ($stmt = $mysql-prepare(SELECT username FROM temp_table WHERE user_id = ?)) { $stmt-bind_param('i', $user_id); $user_id = 1; $stmt-execute(); $stmt-bind_result($name); $stmt-fetch(); printf(Name: %s\n, $name); $stmt-close(); } $mysql-close(); ? This script outputs: Client version: 40107 Server version: 40107 Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement in /home/projects/pacman/_public_html/test.php on line 16 Name: A online example can you find here: http://testing.4worx.com/test.php And the phpinfo() here: http://testing.4worx.com/phpinfo.php [2004-12-09 12:08:50] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. Can't reproduce: ?php $mysql = new mysqli(localhost, root, , test); printf(Client version: %s\n, $mysql-client_version); printf(Server version: %s\n, $mysql-server_version); $mysql-query(DROP TABLE IF EXISTS pm_users); $mysql-query(CREATE TABLE pm_users(username varchar(20), user_id int)); $mysql-query(INSERT INTO pm_users VALUES ('foo', 1)); if ($stmt = $mysql-prepare(SELECT username FROM pm_users WHERE user_id = ?)) { $stmt-bind_param('i', $user_id); $user_id = 1; $stmt-execute(); $stmt-bind_result($name); $stmt-fetch(); printf(Name: %s\n, $name); $stmt-close(); } $mysql-close(); ? Output: Client version: 40108 Server version: 40108 Name: foo [2004-12-09 11:14:03] php at trafex dot nl Description: I was trying to execute the code that you see below. But i got the error Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement in... So i've tried everything, but still got the same error. I think this is a bug, and i hope it can be fixed. I've tried the code with PHP 5.0.2 and PHP 5.0.3 RC1 But still got the same error. For more info please mail me, thanx! Reproduce code: --- /* create a prepared statement */ $stmt = $mysqli-prepare(SELECT username FROM pm_users WHERE user_id = ?) /* bind parameters for markers */ $stmt-bind_param('i', $user_id); $user_id = 1; /* execute query */ $stmt-execute(); Expected result: Nothing at the moment, just NO error. Actual result: -- Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement
#31037 [NEW]: MySQLi - bind_param
From: php at trafex dot nl Operating system: Fedora core 1 PHP version: 5.0.2 PHP Bug Type: MySQLi related Bug description: MySQLi - bind_param Description: I was trying to execute the code that you see below. But i got the error Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement in... So i've tried everything, but still got the same error. I think this is a bug, and i hope it can be fixed. I've tried the code with PHP 5.0.2 and PHP 5.0.3 RC1 But still got the same error. For more info please mail me, thanx! Reproduce code: --- /* create a prepared statement */ $stmt = $mysqli-prepare(SELECT username FROM pm_users WHERE user_id = ?) /* bind parameters for markers */ $stmt-bind_param('i', $user_id); $user_id = 1; /* execute query */ $stmt-execute(); Expected result: Nothing at the moment, just NO error. Actual result: -- Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement in /home/projects/pacman/_public_html/test.php on line 16 -- Edit bug report at http://bugs.php.net/?id=31037edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31037r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31037r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31037r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31037r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31037r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31037r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31037r=needscript Try newer version: http://bugs.php.net/fix.php?id=31037r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31037r=support Expected behavior: http://bugs.php.net/fix.php?id=31037r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31037r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31037r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31037r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31037r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31037r=dst IIS Stability: http://bugs.php.net/fix.php?id=31037r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31037r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31037r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=31037r=mysqlcfg
#31037 [Fbk-Opn]: MySQLi - bind_param
ID: 31037 User updated by: php at trafex dot nl Reported By: php at trafex dot nl -Status: Feedback +Status: Open Bug Type: MySQLi related Operating System: Fedora core 1 PHP Version: 5.0.2 New Comment: Oke i've edited the script you gave for my database. This script do i use now: Code: ?php $mysql = new mysqli(localhost, , , test); printf(Client version: %s\n, $mysql-client_version); printf(Server version: %s\n, $mysql-server_version); $mysql-query(DROP TABLE IF EXISTS temp_table); $mysql-query(CREATE TABLE temp_table(username varchar(20), user_id int)); $mysql-query(INSERT INTO temp_table VALUES ('foo', 1)); if ($stmt = $mysql-prepare(SELECT username FROM temp_table WHERE user_id = ?)) { $stmt-bind_param('i', $user_id); $user_id = 1; $stmt-execute(); $stmt-bind_result($name); $stmt-fetch(); printf(Name: %s\n, $name); $stmt-close(); } $mysql-close(); ? This script outputs: Client version: 40107 Server version: 40107 Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement in /home/projects/pacman/_public_html/test.php on line 16 Name: A online example can you find here: http://testing.4worx.com/test.php And the phpinfo() here: http://testing.4worx.com/phpinfo.php Previous Comments: [2004-12-09 12:08:50] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. Can't reproduce: ?php $mysql = new mysqli(localhost, root, , test); printf(Client version: %s\n, $mysql-client_version); printf(Server version: %s\n, $mysql-server_version); $mysql-query(DROP TABLE IF EXISTS pm_users); $mysql-query(CREATE TABLE pm_users(username varchar(20), user_id int)); $mysql-query(INSERT INTO pm_users VALUES ('foo', 1)); if ($stmt = $mysql-prepare(SELECT username FROM pm_users WHERE user_id = ?)) { $stmt-bind_param('i', $user_id); $user_id = 1; $stmt-execute(); $stmt-bind_result($name); $stmt-fetch(); printf(Name: %s\n, $name); $stmt-close(); } $mysql-close(); ? Output: Client version: 40108 Server version: 40108 Name: foo [2004-12-09 11:14:03] php at trafex dot nl Description: I was trying to execute the code that you see below. But i got the error Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement in... So i've tried everything, but still got the same error. I think this is a bug, and i hope it can be fixed. I've tried the code with PHP 5.0.2 and PHP 5.0.3 RC1 But still got the same error. For more info please mail me, thanx! Reproduce code: --- /* create a prepared statement */ $stmt = $mysqli-prepare(SELECT username FROM pm_users WHERE user_id = ?) /* bind parameters for markers */ $stmt-bind_param('i', $user_id); $user_id = 1; /* execute query */ $stmt-execute(); Expected result: Nothing at the moment, just NO error. Actual result: -- Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement in /home/projects/pacman/_public_html/test.php on line 16 -- Edit this bug report at http://bugs.php.net/?id=31037edit=1