Re: String variable

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

 



Ashley Sheridan wrote:
On Sun, 2009-01-11 at 14:36 +0000, Ashley Sheridan wrote:
On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote:
Hello,
I am trying yo get THIS:
where ref_id = '1234'
from this.
$where="where ref_id="."'$Reference[$x][ref_id]'";

but i certainly have a quote problem.

Any help?
Thanks
Mike




It should look like this:

$where="where ref_id="'{$Reference[$x][ref_id]}'";


Ash
www.ashleysheridan.co.uk


Sorry, it should look like this:

$where="where ref_id='{$Reference[$x][ref_id]}'";

I missed taking an extra quote mark out


Ash
www.ashleysheridan.co.uk


actually unless ref_id is a constant (which i doublt) you may be best going with:

$where = "WHERE ref_id='" . $Reference[$x]['ref_id'] . "'";

keep the php and sql seperate and you'll find it much easier to see in you're editor

(imho) :)

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux