Single/Double Quotes

From: Date: Wed, 12 Dec 2001 14:08:25 +0000
Subject: Single/Double Quotes
Groups: php.general 
Request: Send a blank email to php-general+get-77438@lists.php.net to get a copy of this message
Im tring to rewrite some code to use single/double quotes correctly (as correct as can be). If I use $result=mysql_query('SELECT book FROM ' . TAB_AUTHORS . " WHERE aid = $aid"); I get an mysql error. That should be correct, if I understand it right. But if I use $result=mysql_query('SELECT book FROM ' . TAB_AUTHORS . " WHERE aid = '$aid'"); it works. So what I need to know is that do I have to ride the fine thin line for correctness and speed???

« previous php.general (#77438) next »