i have a mysql database with 100 entrys in 3 tables.
i need to search trought them, but if i search for 'a' in all tables, i get
5000 results...
70 results are the same.
heres my code:
$sql_find="
SELECT
mieter.miet_name, mieter.cat_id, mieter.id,
mieter.miet_beschreibung, cat.cat_name, events.name
FROM
mieter AS mieter,
categories AS cat,
events AS events
WHERE
mieter.miet_name LIKE '%$words%'";
if($option1) $sql_find = $sql_find . " AND mieter.cat_id = '$option1'";
$sql_find = $sql_find . " OR mieter.miet_beschreibung LIKE '%$words%'";
$sql_find = $sql_find . " or events.name LIKE '%$words%'";
with $option1 enabled you can search trought subcategories. can anybody help
me?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]