"[ rswfire ]" <[EMAIL PROTECTED]> wrote"
> Am I programming the hard way?
> mysql_query("SELECT * FROM table WHERE id='".$id."'");
>
> Could I just do this?
> mysql_query("SELECT * FROM table WHERE id='$id'");
Yes. And if $id is always numeric you could simplify it even more. Quotes
are only needed around strings. They aren't needed around numbers. If you
surround a number in quotes it's treated as a string which will result in
different behavior when doing sorting and > or < comparisons.
mysql_query( "SELECT * FROM table WHERE id=$id " );
--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]