RE: [PHP] What does a ? represent

2006-02-17 Thread Shaunak Kashyap
I'm not sure if these completely answer your question but they might get
you started:

http://dev.mysql.com/doc/refman/4.1/en/mysql-stmt-prepare.html
http://dev.mysql.com/doc/refman/4.1/en/mysql-stmt-execute.html

Shaunak Kashyap
 
Senior Web Developer
WPT Enterprises, Inc.
5700 Wilshire Blvd., Suite 350
Los Angeles, CA 90036
 
Main: 323.330.9900
 
www.worldpokertour.com
 
Confidentiality Notice:  This e-mail transmission (and/or the 
attachments accompanying) it may contain confidential information 
belonging to the sender which is protected.  The information is 
intended only for the use of the intended recipient.  If your are not 
the intended recipient, you are hereby notified that any disclosure, 
copying, distribution or taking of any action in reliance on the 
contents of this information is prohibited. If you have received this 
transmission in error, please notify the sender by reply e-mail and 
destroy all copies of this transmission.

-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 17, 2006 11:54 AM
To: php-general@lists.php.net
Subject: [PHP] What does a ? represent

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,`from`, cc, bcc FROM tickets WHERE
id=?,
array($tid)
);

Jeff

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What does a ? represent

2006-02-17 Thread tg-php
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,`from`, cc, bcc FROM tickets WHERE
id=?,
array($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



Re: [PHP] What does a ? represent

2006-02-17 Thread Satyam
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: [EMAIL PROTECTED]

To: php-general@lists.php.net
Cc: [EMAIL PROTECTED]
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,`from`, cc, bcc FROM tickets WHERE
id=?,
   array($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




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What does a ? represent

2006-02-17 Thread Jeff
 -Original Message-
 From: Shaunak Kashyap [mailto:[EMAIL PROTECTED] 
 Sent: Friday, February 17, 2006 15:22
 To: php-general@lists.php.net
 Subject: RE: [PHP] What does a ? represent
 
 
 I'm not sure if these completely answer your question but 
 they might get you started:
 
 http://dev.mysql.com/doc/refman/4.1/en/mysql-stmt-prepare.html
 http://dev.mysql.com/doc/refman/4.1/en/mysql-stmt-execute.html
 
 Shaunak Kashyap
  
 Senior Web Developer
 WPT Enterprises, Inc.
 5700 Wilshire Blvd., Suite 350
 Los Angeles, CA 90036
  
 Main: 323.330.9900
  

Yes, that has the data I needed, thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php