Jump to content

Search system, multiple keywords.


Recommended Posts

alright, just making sure I'm on the right track here:

 

elseif(isset($_GET['search'])){
$search=$_GET['search'];
$keyword=explode(" ",$search);
$keywords=implode(",",$keyword);
$sql10000="SELECT product_id FROM $tbl_name2 WHERE keyword IN($keywords)";
$result10000=mysql($sql10000);
while($row10000=mysql_fetch_array($result10000)){
$product_id3=$row10000['product_id'];
$sql15000="SELECT * FROM $tbl_name WHERE product_id=".$product_id3;
mysql($sql15000);
}
}

The below is returning:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/zyquo/public_html/ghosthuntersportal.com/pages.php on line 39

 

Line 39 is, while($row10000=mysql_fetch_array($result10000)){

 

elseif(isset($_GET['q'])){
$search=$_GET['q'];
$keyword=explode("+",$search);
$keywords=implode(",",$keyword);
$sql10000="SELECT product_id FROM $tbl_name2 WHERE keyword IN($keywords)";
$result10000=mysql_query($sql10000);
while($row10000=mysql_fetch_array($result10000)){
$product_id3=$row10000['product_id'];
$sql15000="SELECT * FROM $tbl_name WHERE product_id=".$product_id3;
$result15000=mysql_query($sql15000);
while($row15000=mysql_fetch_array($result15000)){
extract($row1500);
$content=$product_id;
}
}
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.