Re: pear pager_wrapper and prepare/execute
| From: | Lorenzo Alberton | Date: | Sat, 06 Jan 2007 23:00:28 +0000 |
| Subject: | Re: pear pager_wrapper and prepare/execute | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26277@lists.php.net to get a copy of this message | ||
rav k wrote:
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 glad they helped
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();ATM only the Pager_Wrapper_DB() function supports query parameters. I'll see what I can do to add them to Pager_Wrapper_MDB2(). Can you open a feature request? http://pear.php.net/bugs/report.php?package=Pager If you execute the prepared statement like above, you loose the benefit of the wrapper anyways, so you can just pass the returned data array to Pager (without the wrapper). HTH Best regards, -- Lorenzo Alberton http://pear.php.net/user/quipo ___________________________________________________________________ Quipo Free Internet - 2 email, 150 Mb di spazio web e molto di più. ADSL, Hardware & Software Online Store