ID: 38031
Updated by: [EMAIL PROTECTED]
Reported By: mdy_x at yahoo dot com
Status: Bogus
Bug Type: MySQLi related
Operating System: windows xp sp2
PHP Version: 5.1.4
New Comment:
Yes, you're using it in wrong way.
No bug here.
Previous Comments:
------------------------------------------------------------------------
[2006-07-07 12:38:55] mdy_x at yahoo dot com
hi again, here is the sample code:
<?php
...
$sql='SELECT surname FROM user
WHERE name IN (?)';
$surNameList='Jake,Tom,Mary';
$stmt=$con->prepareQuery($sql);
$stmt->bind_param('s',$surNameList);
...
?>
I expect the surnames of these people as a result set, but it returns
nothing...
By the way, it is a very very basic need, PHP doesn't have to be
magician to do this work - at least, I hope so :)
------------------------------------------------------------------------
[2006-07-07 12:17:39] [EMAIL PROTECTED]
This usage is wrong.
MySql is good but no magician.
------------------------------------------------------------------------
[2006-07-07 11:14:55] [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 to avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2006-07-07 10:43:42] mdy_x at yahoo dot com
Description:
------------
mysqli_stmt_bind_param() doesn't work as expected, when the param is a
string like: 'a','b','c'
Reproduce code:
---------------
$sql='select surname from user where name in (?)';
$stmt = this->connection->prepareQuery($sql);
$stmt->bind_param('s', $nameList);
Expected result:
----------------
'Jake', 'Mary','Tom'
Actual result:
--------------
No result
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38031&edit=1