Jump to content

bradmasterx

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bradmasterx's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It dosent get down to the bottom ? i even tried echo'ing the $SQL varible inside the query function but just nothing. No errors are given but the query does not take place. function runSearch (DBConnection $DB ,$keyword=false, $partno=false, $manufacturer=false, $Start=0, $Limit=30){ $SQL = "SELECT * FROM `turbodata`"; if(!empty($keyword)){ $peices = explode(" ", $keyword); $HowManyKeywords = count($peices); if($HowManyKeywords == 1){ $SQL .= " WHERE `make` LIKE '%$keyword%' "; $SQL .= "|| `model` LIKE '%$keyword%' "; $SQL .= "|| `engine` LIKE '%$keyword%' "; $SQL .= "|| `enginecode` LIKE '%$keyword%'"; $SQL .= "|| `year` LIKE '%$keyword%' "; $SQL .= "|| `turbotype` LIKE '%$keyword%' "; $SQL .= "|| `partno` LIKE '%$keyword%' "; $SQL .= "|| `dashnumbers` LIKE '%$keyword%' "; $SQL .= "|| `oem` LIKE '%$keyword%' "; $SQL .= "|| `oem2` LIKE '%$keyword%' "; $SQL .= "|| `oem3` LIKE '%$keyword%' "; $SQL .= "|| `oem4` LIKE '%$keyword%' "; $SQL .= "|| `oem5` LIKE '%$keyword%' "; $SQL .= "|| `oem6` LIKE '%$keyword%'"; }elseif($HowManyWords > 1){ for($a=0;$a<$HowManyKeywords;$a++) { $SQL = " WHERE `make` LIKE '%$pieces[$a]%' "; $SQL .= "|| `model` LIKE '%$pieces[$a]%' "; $SQL .= "|| `engine` LIKE '%$pieces[$a]%' "; $SQL .= "|| `enginecode` LIKE '%$pieces[$a]%'"; $SQL .= "|| `year` LIKE '%$pieces[$a]%' "; $SQL .= "|| `turbotype` LIKE '%$pieces[$a]%' "; $SQL .= "|| `partno` LIKE '%$pieces[$a]%' "; $SQL .= "|| `dashnumbers` LIKE '%$pieces[$a]%' "; $SQL .= "|| `oem` LIKE '%$pieces[$a]%' "; $SQL .= "|| `oem2` LIKE '%$pieces[$a]%' "; $SQL .= "|| `oem3` LIKE '%$pieces[$a]%' "; $SQL .= "|| `oem4` LIKE '%$pieces[$a]%' "; $SQL .= "|| `oem5` LIKE '%$pieces[$a]%' "; $SQL .= "|| `oem6` LIKE '%$pieces[$a]%'"; } } if(!empty($partno)){ if(!strstr($SQL, "WHERE")){ $SQL .= " WHERE `partno` LIKE '$partno%'"; } else{ $SQL .= " && `partno` LIKE '$partno%'"; } } if(!empty($manufacturer)){ if(!strstr($SQL, "WHERE")){ $SQL .= " WHERE `make` LIKE '$manufacturer'"; } else{ $SQL .= " && `make` LIKE '$manufacturer'"; } } $SQL .= " LIMIT {$Start},{$Limit}"; return $DB->query($SQL); } }
  2. RewriteEngine on RewriteRule ^home/$ /index.php?page=home How can i make this so home/?page=1 index.php?page=home&page=1 Thanks,
  3. I dont use word press but by the code you have just given inside the function wp_title is were is gets outputed?
  4. You will have to show us the AJAX and form class in order to tell you what is wrong or if your using a framework to tell us what framework your using.
×
×
  • 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.