Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.