ciao a tutti ho bisogno estremo di un vostro aiuto visto che tutti i miei tentavi non vanno a buon fine.
Deve effettuare una ricerca su 4 tabelle tramite una variabile $search.
Le tabelle con i rispettivi campi interessati da ricercare sono le seguenti:
tabella page:
-----------------------
| ID | Page | Content |
tabella avent:
--------------------------------------
| ID | Object | Description | Content |
tabella news:
----------------------------
| ID | Object | Description |
tabella podcast:
-------------------------
| ID | Title | Description |
ho provato così:
Codice PHP:
$sql="SELECT page.ID, Page_it, page.Content_it, event.ID, event.Object_it, ";
$sql.="event.Description_it, event.Content_it, news.ID, news.Object_it, ";
$sql.="news.Description_it, podcast.ID, Title_it, podcast.Description_it ";
$sql.="FROM page, event, news, podcast WHERE Page_it LIKE '%$research%' OR page.Content_it LIKE '%$research%' OR ";
$sql.="event.Object_it LIKE '%$research%' OR event.Description_it LIKE '%$research%' OR event.Content_it LIKE '%$research%' OR ";
$sql.="news.Object_it LIKE '%$research%' OR news.Description_it LIKE '%$research%' OR Title_it LIKE '%$research%' OR ";
$sql.="podcast.Description_it LIKE '%$research%'";
mysql_query($sql) or die (mysql_error());
ma senza risultati purtroppo ache se la ricerca effettuata è contenuta in una tabella mi da 0 come risultati.