Re: note 90738 deleted from function.mysql-query by danbrown

From: Date: Thu, 07 May 2009 12:59:35 +0000
Subject: Re: note 90738 deleted from function.mysql-query by danbrown
References: 1 2 3  Groups: php.notes 
Request: Send a blank email to php-notes+get-154313@lists.php.net to get a copy of this message
Heh. I took two looks at it first, too. The code itself was just fine, but I wouldn't consider it obvious enough for the general public to be placed without explanation. If the original submitter were to re-post with a simple explanation "this code creates a string of sanitized data for MySQLi" (or something similar), then it would be no problem.... but as it stands now, it wouldn't be immediately recognizable for a lot of folks --- particularly the old-hats such as myself who still code procedurally. ;-P On Thu, May 7, 2009 at 08:53, Thiago H. Pojda <thiago.pojda@gmail.com> wrote: > Thanks, I wasn't sure if it was bad. :) > > > Thiago Henrique Pojda > http://nerdnaweb.blogspot.com > > On Thu, May 7, 2009 at 9:51 AM, <danbrown@php.net> wrote: > >> Note Submitter: marcandrebinder at googlemail dot com >> >> ---- >> >> You like vsptinf()? >> >> <?php >> /** >>  * Runs a queryf();. >>  * >>  * @return mysqli_result >>  */ >> public function queryf() { >>    $args = func_get_args(); >>    $qry = array_shift($args); >>    $args = array_map(array($this->_mysqliObject, 'real_escape_string'), >> $args); >>    $qry = vsprintf($qry, $args); >>    $this->_mysqliQuerys[] = $qry; >>    return $this->_mysqliObject->query($qry); >> } >> ?> >> >> -- >> PHP Notes Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > -- </Daniel P. Brown> daniel.brown@parasane.net || danbrown@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW10000

« previous php.notes (#154313) next »