Newbie select statement questions 'WHERE'

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

 



NEWBIE! I have some GET data coming from a previous search form.

How do I add the WHERE part ?

orig:

$query_get1 = "SELECT p_First, p_id, p_Last, p_Lvl, p_Sel
FROM contacts";

------W / WHERE...???

$query_get1 = "SELECT p_First, p_id, p_Last, p_Lvl, p_Sel
FROM contacts
WHERE p_First like $_GET['p_First'] or p_Last like $_GET['p_Last']";


I tried various things that make errors:
 
where p_First like '%$_GET['p_First ']%'";
where p_First like ".$_GET['p_First ']."";
Etc...

How can I make this work?

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




-- 
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