Re: What does a "?" represent
| From: | Satyam | Date: | Fri, 17 Feb 2006 20:58:43 +0000 |
| Subject: | Re: What does a "?" represent | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230668@lists.php.net to get a copy of this message | ||
Not is SQL, the single character wildcard is the underscore. In SQL the ? is usually used for argument replacement, much like the %s in printf.
Satyam
----- Original Message ----- From: <tg-php@gryffyndevelopment.com>
To: <php-general@lists.php.net>
Cc: <jsmforum@optonline.net>
Sent: Friday, February 17, 2006 9:24 PM
Subject: Re: [PHP] What does a "?" represent
It's usually used as a single character wildcard. So "something = ?" would match "A", "B", "1", etc.. but not "AB, "A1". -TG = = = Original message = = = In the some code I'm working with I see many database queries using the PEAR DB class where "?" is used for a value in the SQL. What is the rule for using "?" in this way what value does it take. Example code.$ticket=$db->getRow( "SELECT id,department,id=?",from, cc, bcc FROM tickets WHEREarray($tid) );Jeff ___________________________________________________________ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php