stevenm187 Posted July 27, 2009 Share Posted July 27, 2009 I have a found set of items that i wish to narrow down even further. The products being displayed are accessories for trucks. I want to give the user the option to select their vehicle year make and model so that the items that are for that specific car will show, and everything else will be filtered out. here is a visual example http://www.discounttruckaccessories.com/cilist.php?SubCategory2=Tailgate For some reason when i choose the model make and year the error page displays claiming there are no records found. When I know for sure that there are records that meet the criteria. here is the code for the form. <form action="cinlist.php" method="get" id="nvehicle" name="nvehicle"> <input type="hidden" value="<?php echo $sublist_row->getField('SubCategory2'); ?>" name="SubCategory2"> <div> <select id="pda-brand" > <option value="select">Select Make...</option> <option value="Dodge">Dodge</option> </select> <select id="pda-type" name="pda-type" onchange='start_search()'> <option class="select" value="select">Select type</option> <?php foreach($dodge_result->getRecords() as $dodge_row){ ?> <option class="Dodge" value="<?php echo $dodge_row->getField('id'); ?>"><?php echo $dodge_row->getField('id'); ?></option> <?php } ?> </select> </div> </form> and here is the recordset $cinlist_find = $Rackspace->newFindCommand('DTA INVENTORY'); $cinlist_findCriterions = array('SubCategory2'=>$_GET['SubCategory2'],'VehicleId'=>$_GET['pda-type'],); foreach($cinlist_findCriterions as $key=>$value) { $cinlist_find->AddFindCriterion($key,$value); } can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/167675-searching-within-a-found-recordset/ Share on other sites More sharing options...
nadeemshafi9 Posted July 27, 2009 Share Posted July 27, 2009 put in you where clause AND year LIKE '{$year}' AND make LIKE '{$make}' AND blah if you use %% AND year LIKE '%{$year}%' AND make LIKE '%{$make}%' AND blah then if year or make is '' noting then it wont effect the statment because everything is nothing yet nothing is everything Quote Link to comment https://forums.phpfreaks.com/topic/167675-searching-within-a-found-recordset/#findComment-884290 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.