Re: Search a word in multiple tables
| From: | raditha dissanayake | Date: | Fri, 05 Nov 2004 13:09:37 +0000 |
| Subject: | Re: Search a word in multiple tables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201281@lists.php.net to get a copy of this message | ||
Phpu wrote:
Hi,
How can i search a specific word in 2 tables
I use this but it is not working
sql = "SELECT a.product_id, a.".select_language('product_name_en', 'product_name_fr').", b.brand_name FROM products_accessories as a, brands as b WHERE (a.".select_language('product_name_en', 'product_name_fr')." LIKE '%".$word."%' OR b.brand_name LIKE '%".$word."%')";
$result= mysql_query($sql);
Thanks
does this become a PHP question just because of
$result= mysql_query($sql); ??
--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.