[thelist] PHP, querystring question, figured it out

Anthony Baratta Anthony at Baratta.com
Fri May 25 15:33:40 CDT 2001


At 12:37 PM 5/25/2001, you wrote:
><tip>
>In PHP, be sure to put ticks around your variables when passing them in a 
>query.
>
>$example = mysql_query("SELECT * FROM cars2 where vin= '$vin' " ,$db);
></tip>

FYI...

This no a PHP thing. Its an SQL thing. When you are entering "text" data in 
the where clause, you must enclose this data in '' or "". You do not have 
to do this with numerical data.


---
Anthony Baratta
President
Keyboard Jockeys





More information about the thelist mailing list