pear pager_wrapper and prepare/execute
| From: | rav k | Date: | Sat, 30 Dec 2006 00:59:41 +0000 |
| Subject: | pear pager_wrapper and prepare/execute | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26228@lists.php.net to get a copy of this message | ||
First off thanks to Lorenzo for his tutorials at http://www.alberton.info/pear_pager_tutorials.html which made pagination extremely easy for me. First time I even heard of it and I managed to get it working which is excellent thanks to you!!
I'm stuck on one part however which I hope you can help with:
Normally queries are like this:
$query = 'SELECT * FROM Levels';
$paged_data = Pager_Wrapper_MDB2($mdb2, $query, $pager_options);
But what I want to do is make sure mine are secure and I have been using prepare/execute quite well, so for instance how do I use this:
$statement=$mdb2->prepare('SELECT * FROM Posts WHERE Userid = ?', array('integer'), array('integer','integer','integer','text','text','date','date','text'));
$res=$statement->execute($userid);
$statement->free();
What '$paged_data =' line do I need to use? I'm tried to just replace $query with $res but that causes errors so what's the correct format please???
Many thanks
rav
_________________________________________________________________
Find Singles In Your Area This Christmas With Match.com! msnuk.match.com