Re: Re: Another newbie question -- ANSWERED!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 7 Sep 2004 13:16:20 -0400 (EDT), Pete Holsberg <pjh@xxxxxxxx> wrote:

> With a Unix shell programming background, I'm puzzled by
> the use of 'tics' (single quotes, apostrophes' around
> %$search_string%. I would have though that they would have
> removed the special meaning of the $.

Since you started the string with dbl quotes ($sql), any variables you
use in that string will work even if you wrap it in single quotes
(tics). If you use single quotes for the $sql string, you have to
'step out' of the string (or whatever you call it).

$sql = "SELECT * FROM $table"; // works
$sql = 'SELECT * FROM '.$table; // works
$sql = 'SELECT * FROM $table'; // doesn't work

randy

-- 
randy sesser@xxxxxxxxx

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux