Jump to content

keyword search help


MikeDXUNL

Recommended Posts

say the Database Field: `keywords` consists of 'halo 3 xbox 360 master chief'

 

now $by = keywords automattically unless stated otherwise.

 

so the url = http://myurl.com/search.php?halo+xbox&whereat=videogames

i want the mysql_query to look like "SELECT * FROM $whereat WHERE $qu ORDER BY releasedate ASC"

<?php 
$re = split(" ", $q);
$i=0;
while($i < count($re)) {
$qu = " $by LIKE %".$re[''.$i.'']."% OR";

$i++;
}
?>

 

any help on how to piece together the query i desire is thanked in advance :)

 

- Mike

 

Link to comment
https://forums.phpfreaks.com/topic/86071-keyword-search-help/
Share on other sites

when I try, I get the Syntax Error: Fatal error: Only variables can be passed by reference in C:\wamp\www\vgant\search.php on line 296

 

line 296: array_push(" $by like '%{$re[$i]}%' ",$arrCondition);

 

I tried to edit the go about of quotation marks, but cant seem to figure it out..

any help? :)

 

Thanks,

Mike

Link to comment
https://forums.phpfreaks.com/topic/86071-keyword-search-help/#findComment-440153
Share on other sites

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.