PHP expert |
|
Ik heb de volgende query (Ik weet het hij is lang):
<?php
$search_where = implode(' LIKE %' . $_POST['search_word'] . '% OR ', $_POST['search_where']) . ' LIKE %' . $_POST['search_word'] . '%';
$movies_query = $db->query("SELECT i.id, i.title, i.episodes, i.complete, i.cd, i.dvd, c.title as cat_title FROM movies_items as i, movies_categories as c WHERE c.id = i.cid AND (" . $search_where . ") ORDER BY i.title");
?>
<?php $search_where = implode(' LIKE %' . $_POST['search_word'] . '% OR ', $_POST['search_where']) . ' LIKE %' . $_POST['search_word'] . '%'; $movies_query = $db->query("SELECT i.id, i.title, i.episodes, i.complete, i.cd, i.dvd, c.title as cat_title FROM movies_items as i, movies_categories as c WHERE c.id = i.cid AND (" . $search_where . ") ORDER BY i.title"); ?>
Voorbeeld:
http://movies.xenox-designs.net/
http://movies.xenox-designs.net/search/
Vul naruto in en je ziet dat hij niets vind. Weet iemand misschien wat ik fout doe?
Alvast bedankt
|