php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #63799 Make interface for prepared statements easier
Submitted: 2012-12-18 21:27 UTC Modified: 2012-12-18 21:29 UTC
Votes:5
Avg. Score:3.0 ± 1.3
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: thbley at gmail dot com Assigned:
Status: Open Package: MySQLi related
PHP Version: 5.5.0alpha1 OS: win7 x64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
18 + 8 = ?
Subscribe to this entry?

 
 [2012-12-18 21:27 UTC] thbley at gmail dot com
Description:
------------
Please offer an easier interface to run prepared statements, e.g.

$db = new mysqli_db('127.0.0.1', 'root', 'some_pw', 'test');

foreach ($db->query('select * from bla where someint=? and somechar=?', MYSQLI_STORE_RESULT, [10, 'hello_world']) as $row) {...}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-18 21:29 UTC] thbley at gmail dot com
or sprintf-style instead of auto-detection:

foreach ($db->query('select * from bla where someint=%d and somechar=%s', MYSQLI_STORE_RESULT, [10, 'hello_world']) as $row) {...}
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 11:01:36 2019 UTC