Sven Heising wrote:
>
> Hi list,
>
> I'am new in this php and mysql-stuff so i need al lil bit support...
>
> this is my problem:
> $result = mysql_query("select * from $dbtable where $wonach like
> '%$first_name%' ");
>
> $wonach is a var which is set in a html form.... if i want to search one row
> it is no problem....selecting works!
> But how to search in all rows? What is the wildcard command?
Hello,
It seems to me you are mixing up the terms "row" and "column". But I
might be wrong.
Anyway, to search all _columns_ in a database you have make a query like
this:
$result = mysql_query("select * from $dbtable where column1 like
'%$first_name%' OR column2 like '%$first_name%' OR column3 .......");
Robert
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php