> Hello, this is how I'm searching a database now...is there an easier way
> (PHP)?  Anything that's short would be nice.  This is just really long.

You can do something like this:


> $searchgenre = "'punk','hardcore', 'classical', 'acoustic'";

> $sql_text = "SELECT * FROM artists WHERE genre in ($searchgenre) ORDER BY
artist ASC";


Alternatively, look at the SET and ENUM datatypes if your genres are pretty
static.


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

Reply via email to