sql query

Robin Robin
Wed Nov 13 15:15:13 GMT 2002


can you use 'LIKE' and '=' in the same sql query?

e.g

if ($result = mysql_query("SELECT * FROM db WHERE name LIKE '$name%' OR id =
'$id'", $db));
{
    blah blah blah
}

as the id don't seem to be querying...

any suggestions?

cheers!

Robin Garbutt
Portfolio Art & Design Ltd
Tel -  +44 (0) 1204 383822
Fax - +44 (0) 1204 383866
Mob - +44 (0) 7811 185490
e-mail - Rob at portfoliodesign.net

For further information please visit us at :-
www.portfoliodesign.net

The contents of this e-mail are confidential to the ordinary user of the
e-mail address to which it was addressed and may also be privileged. If you
are not the addressee of this e-mail you may not copy, forward, disclose or
otherwise use it or any part of it in any form whatsoever. If you have
received this e-mail in error please e-mail the sender.






More information about the Ukfreebsd mailing list