Re: [PHP] Single/Double Quotes

2001-12-12 Thread Miles Thompson
This should work ... $result=mysql_query(SELECT book FROM TAB_AUTHORS WHERE aid = '$aid'); When PHP sees the single quotes around the $aid it evaluates it to the value stored in the variable. Your first example connntained $aid within a set of double quotes, thus it was treated as a literal.

Re: [PHP] Single/Double Quotes

2001-12-12 Thread Kevin Stone
I see your question has already been answered, but I'll add a tip that works well for me. Whenever I want to perform an SQL query that involves PHP variables I will write the query string to its own variable instead of directly into the function. Then use that variable in the query function...

Re: [PHP] Single/Double Quotes

2001-12-12 Thread Konrad Riedel
Am Wed, 12.Dec 2001 um 10:22 schrieb Miles Thompson: This should work ... $result=mysql_query(SELECT book FROM TAB_AUTHORS WHERE aid = '$aid'); When PHP sees the single quotes around the $aid it evaluates it to the value stored in the variable. Your first example connntained $aid within