search query problem

From: Date: Sat, 26 Jul 2003 07:53:11 +0000
Subject: search query problem
Groups: php.db 
Request: Send a blank email to php-db+get-29489@lists.php.net to get a copy of this message
hi i am making a simple search form how can i search more than one table for the same word i used a query and it failed here it is @ $db = mysql_connect("localhost"); mysql_select_db("egycds"); $test_tr = mysql_query("select newdvd.date, newpcgames.date, olddvd.date, screener.date, newdvd.type, newpcgames.type, olddvd.type, screener.type, newdvd.name, newpcgames.name, olddvd.name, screener.name, newdvd.cds, newpcgames.cds, olddvd.cds, screener.cds, newdvd.downloader, newpcgames.downloader, olddvd.downloader, screener.downloader, where newdvd.name like '%".$word."%' or newpcgames.name like '%".$word."%' or olddvd.name like '%".$word."%' or screener.name like '%".$word."%'"); while ($record=mysql_fetch_array($test_tr)){ echo "
                               <TR onmouseover=\"this.bgColor='000000'\" onmouseout=\"this.bgColor='475674'\" bgColor=#475674>
                               <TD width=75>
                               <DIV align=center><FONT
                               color=#ffffff>";
                               echo stripslashes($record['date']) ;
                               echo "</FONT></DIV></TD>
                               <TD width=50>
                               <DIV align=left><FONT color=white>";
                               echo stripslashes($record['type']) ;
                               echo "</FONT></DIV></TD>
                               <TD><FONT color=#ffffff><strong>&nbsp;&nbsp;<A
                               href=\"";
                               echo stripslashes($record['link']);
                               echo "\" target=_new1>";
                               echo stripslashes($record['name']);
                               echo "</A>&nbsp;&nbsp;</strong></FONT></TD>
                               <TD width=40>
                               <DIV align=left><FONT color=#ffffff><A
                               href=\"";
                               echo stripslashes($record['subtitle']);
                               echo "\">";
                               echo stripslashes($record['cds']);
                               echo "</FONT></DIV></TD>
                               <TD width=50>
                               <DIV align=left><FONT color=#ffffff><A
                               href=\"";
                               echo stripslashes($record['downloaderlink']);
                               echo "\">";
                               echo stripslashes($record['downloader']);
                               echo "</A></FONT></DIV></TD>
                               </TR> ";
                               }
                                echo "</TBODY></TABLE>";
can anyone help please. _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail

« previous php.db (#29489) next »