DSTR3 Posted February 9, 2013 Share Posted February 9, 2013 I am running a query that works until I add the variable $selections. This is from a multi-select dropdown box. I am sure my syntax is off on this. I am using MySQL 5.0 Error message is "Cannot Parse Query" SELECT tblLocations.CityID, tblDetails.DetailName, tblRestaurants.RestName, CONCAT(tblLocations.StreetNumber,' ',tblLocations.Street) Address, tblLocations.Phone, tblLocations.Price, tblLocations.Rating, tblRestaurants.RestPage FROM (tblRestaurants INNER JOIN tblLocations ON tblRestaurants.RestID = tblLocations.RestID) INNER JOIN (tblLocDet INNER JOIN tblDetails ON tblLocDet.DetailID = tblDetails.DetailID) ON tblLocations.LocationID = tblLocDet.LocationID GROUP BY tblLocations.CityID, tblLocations.AreaID, tblLocations.CuisineID, tblDetails.DetailName, tblRestaurants.RestName, tblLocations.Street, tblLocations.Phone, tblLocations.Price, tblLocations.Rating HAVING tblLocations.CityID='16' AND tblLocations.AreaID='131' AND tblLocations.CuisineID='3' AND tblDetails.DetailName='( ' . implode(' AND ', $selections) . ' )' ORDER BY tblRestaurants.RestName ASC Link to comment Share on other sites More sharing options...
Barand Posted February 9, 2013 Share Posted February 9, 2013 Post the query after the $selections has been imploded. It's impossible to see what is actually submitted at present. Link to comment Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 (edited) The fact that he's using AND as the delimiter for implode should through a red flag though. AFAIK you cannot do field = (value1 AND value2) - for one, it's not the right syntax, and secondly a single column CANNOT be BOTH value1 and value2. OP, you can use IN() and use a comma as the delim. Edited February 9, 2013 by Jessica Link to comment Share on other sites More sharing options...
DSTR3 Posted February 9, 2013 Author Share Posted February 9, 2013 (edited) OK, I'm going to reduce the code just to get a better handle on this. I have a multiple select list box. I am selecting multiple items in this box and want to run my query and get the results based on the selections in the box. Such as this...if the user selects Cat, Dog and Pig. I want only the records to be returned that have Cat and Dog and Pig. Not those with Cat or Dog or Pig. Of course this is greatly simplified, I have 42 options, so this is why I need the DetailsName part of the query to be built dynamically. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="Test"> <select name="p[]" size="10" style="width:170px" multiple="multiple" method="POST"> <?php error_reporting(E_ALL); include("config.php"); $sql = "SELECT tblDetails.DetailType AS type, GROUP_CONCAT(DISTINCT DetailName ORDER BY DetailName ASC SEPARATOR '|') AS DetailName FROM tblLocations INNER JOIN (tblLocDet INNER JOIN tblDetails ON tblLocDet.DetailID = tblDetails.DetailID) ON tblLocations.LocationID = tblLocDet.LocationID GROUP BY tblDetails.DetailType,tblLocations.CityID,tblLocations.AreaID,tblLocations.CuisineID HAVING (((tblLocations.CityID)='16') AND ((tblLocations.AreaID)='131') AND ((tblLocations.CuisineID)='3'))"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { echo "<optgroup label='{$row['type']}'>"; $DetailNames = explode('|', $row['DetailName']); foreach($DetailNames as $DetailName) { echo "<option value='".$DetailName."'>".$DetailName."</option>"; } echo "</optgroup>"; } ?> </select> <input type="submit" name="unused" value="Post Selections" /> </form> <?php include("config.php"); if (!empty($_POST)) { $selections = ($_POST['p']); foreach ($selections as $key => $value) { $selections[$key] = trim($value); if (empty($selections[$key])) unset($selections[$key]); } if (empty($selections)) die('No Selection'); $where = 'WHERE ( ' . implode(' AND ', $selections) . ' )'; print_r($where); ?> <?php if(!isset($selections)) { echo("<p>You didn't select any filters!</p>\n"); } else { $nselections = count($selections); echo("<p>$nselections filter(s) selected:<br>"); for($i=0; $i < $nselections; $i++) { echo($selections[$i] . "<br/>"); } echo("</p>"); $DM = implode(',',$selections); if(!$rs=mysql_query("SELECT tblRestaurants.RestName, tblDetails.DetailName, tblLocations.CityID, tblLocations.AreaID, tblLocations.CuisineID, tblLocations.RestID, CONCAT(tblLocations.StreetNumber,' ', tblLocations.Street) Address,tblRestaurants.RestPage, tblLocations.StreetNumber, tblLocations.Street, tblLocations.Phone, tblLocations.Price, tblLocations.Rating FROM tblDetails INNER JOIN tblRestaurants INNER JOIN tblLocations ON tblRestaurants.RestID = tblLocations.RestID INNER JOIN tblLocDet ON tblLocations.LocationID = tblLocDet.LocationID ON tblDetails.DetailID = tblLocDet.DetailID WHERE tblLocations.tblCityID = '16' AND tblLocations.AreaID ='131' AND tblLocations.CuisineID = '3' AND tblDetails.DetailName = '$_POST('$selections') ORDER BY tblRestaurants.RestName;")) { echo "Cannot parse query"; } elseif(mysql_num_rows($rs) == 0) { echo "No records found"; } else { echo "<table id=\"myTable\" table width=\"710\" class=\"beautifuldata\" align=\"Left\" cellspacing=\"0\">\n"; echo "<thead>\n<tr>"; echo "<th>PLACE</th>"; echo "<th>ADDRESS</th>"; echo "<th>PHONE</th>"; echo "<th>PRICE</th>"; echo "<th>RATING</th>"; echo "</tr>\n</thead>\n"; while($row = mysql_fetch_array($rs)) { echo"<tr> <td><strong><a href='$row[RestPage]'>$row[RestName]</a></strong></td> <td>$row[Address]</td> <td>$row[Phone]</td> <td>$row[Price]</td> <td>$row[Rating]</td> </tr>\n"; } echo "</table><br />\n"; } } } ?> Edited February 9, 2013 by DSTR3 Link to comment Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 I don't see anything in there related to animals. This sounds very similar to a question I just asked. Read this and see if it helps. http://forums.phpfreaks.com/topic/274119-matching-a-one-to-many-relationship-exactly/ Link to comment Share on other sites More sharing options...
DSTR3 Posted February 9, 2013 Author Share Posted February 9, 2013 Just using the animals as an example! LOL! The listbox has values like "Fireplace", "Buffet", "Waterfront", etc....In any case why am I not getting a result on my query? Link to comment Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 This sounds very similar to a question I just asked. Read this and see if it helps. http://forums.phpfre...onship-exactly/ Link to comment Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 As to why your query is failing: AND tblDetails.DetailName = '$_POST('$selections') There are so many things wrong with that... Link to comment Share on other sites More sharing options...
DSTR3 Posted February 9, 2013 Author Share Posted February 9, 2013 (edited) OK, So how does one "Make It Right?" I did switch WHERE to HAVING as read in your question. Changed it to this..... AND tblDetails.DetailName = '$DM') Still no results... Edited February 9, 2013 by DSTR3 Link to comment Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 If you want us to be able to help you you need to post your table structure, some sample data, and go read up on MySQL syntax, as well as probably some basic PHP syntax - like how $_POST is an array, not a function. It says Cannot Parse Query because that's the error message YOU'VE chosen to print when your query fails. You could get a much better error by using the tips in my Debugging SQL post. But you haven't explained how your data is related so we can't help you. There's a lot more to the post I wrote than just WHERE vs HAVING, you're not doing anything I did. Link to comment Share on other sites More sharing options...
Barand Posted February 9, 2013 Share Posted February 9, 2013 Still no sign of the actual query that is submitted. Good luck. Link to comment Share on other sites More sharing options...
DSTR3 Posted February 9, 2013 Author Share Posted February 9, 2013 Barand, Everything is there. The problem is with the multiple variables. Jessica here are the tables involved. tblRestaurants RestID RestName RestPage tblLocations LocationID CityID AreaID CuisineID tblLocDet LocationID DetailID tblDetails DetailID DetailType DetailName The problem is the one line as you say it is. I am aware of that and the message I am getting. I just need to know how to build the last part of the query to accomodate the variables. Link to comment Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 Good luck Link to comment Share on other sites More sharing options...
DSTR3 Posted February 9, 2013 Author Share Posted February 9, 2013 (edited) Really. Why do you bother? If you don't want to help, or can't just say so, or better yet don't even post. Life is so much easier when you help people....but I guess some people don't see it that way. Edited February 9, 2013 by DSTR3 Link to comment Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 ROTFL. Yes, your life would be easier if we just did it for you. Too bad for you this is FREE HELP and we actually expect you to HELP US HELP YOU. I've asked you at least FIVE questions you haven't answered fully, I've given you a thread that describes IN DETAIL how I solved this problem (if it IS the same problem, you haven't given enough INFORMATION for me to be sure), and you refuse to actually do any of the things we suggest. Why do *YOU* bother? You clearly don't want to be helped. Why did you bother posting this? Life is so much easier when PEOPLE HELP THEM GOD DAMN SELVES. I'm so sick of people like you whinging for help and then when it's not handed to you on a silver platter in ONE FUCKING POST you blame US. Link to comment Share on other sites More sharing options...
DSTR3 Posted February 9, 2013 Author Share Posted February 9, 2013 You are one NASTY person! Link to comment Share on other sites More sharing options...
Barand Posted February 9, 2013 Share Posted February 9, 2013 We are not psychic. We cannot look over your shoulder and see what you are seeing. To help we often need more information and ask for it. If we don't get it there is no point in our wasting our time and we move on. Link to comment Share on other sites More sharing options...
DSTR3 Posted February 9, 2013 Author Share Posted February 9, 2013 You have everything that I have. I gave you all of the code on my page. I gave you the tables. I don't know what else to give you. The problem is: I am trying to run a query that uses the selected options on a drop down multi-select. The drop down has 42 options. I do not know how many or what will be selected, but I need to run my query based on the selections made in the dropdown. I can get one option working, however: when I select more than one I get bak "No Records found". Here is the code at this point. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="Test"> <select name="p[]" size="10" style="width:170px" multiple="multiple" method="POST"> <?php error_reporting(E_ALL); include("config.php"); $sql = "SELECT tblDetails.DetailType AS type, GROUP_CONCAT(DISTINCT DetailName ORDER BY DetailName ASC SEPARATOR '|') AS DetailName FROM tblLocations INNER JOIN (tblLocDet INNER JOIN tblDetails ON tblLocDet.DetailID = tblDetails.DetailID) ON tblLocations.LocationID = tblLocDet.LocationID GROUP BY tblDetails.DetailType,tblLocations.CityID,tblLocations.AreaID,tblLocations.CuisineID HAVING (((tblLocations.CityID)='16') AND ((tblLocations.AreaID)='131') AND ((tblLocations.CuisineID)='3'))"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { echo "<optgroup label='{$row['type']}'>"; $DetailNames = explode('|', $row['DetailName']); foreach($DetailNames as $DetailName) { echo "<option value='".$DetailName."'>".$DetailName."</option>"; } echo "</optgroup>"; } ?> </select> <input type="submit" name="unused" value="Post Selections" /> </form> <?php include("config.php"); if (!empty($_POST)) { $selections = ($_POST['p']); foreach ($selections as $key => $value) { $selections[$key] = trim($value); if (empty($selections[$key])) unset($selections[$key]); } if (empty($selections)) die('No Selection'); $where = 'WHERE ( ' . implode(' AND ', $selections) . ' )'; //print_r($where); //var_dump($_POST) ?> <?php if(!isset($selections)) { echo("<p>You didn't select any filters!</p>\n"); } else { $nselections = count($selections); echo("<p>$nselections filter(s) selected:<br>"); for($i=0; $i < $nselections; $i++) { echo($selections[$i] . "<br/>"); } echo("</p>"); $DM = implode(',',$selections); if(!$rs=mysql_query("SELECT tblRestaurants.RestName, tblLocations.CityID, tblLocations.AreaID, tblLocations.CuisineID, tblLocations.RestID, tblRestaurants.RestPage, CONCAT(tblLocations.StreetNumber,' ', tblLocations.Street) AS Address, tblLocations.Phone, tblLocations.Price, tblLocations.Rating, tblDetails.DetailName FROM tblRestaurants INNER JOIN tblLocations ON tblRestaurants.RestID = tblLocations.RestID INNER JOIN tblLocDet ON tblLocations.LocationID = tblLocDet.LocationID INNER JOIN tblDetails ON tblLocDet.DetailID = tblDetails.DetailID WHERE tblLocations.CityID='16' AND tblLocations.AreaID='131' AND tblLocations.CuisineID='3' AND tblDetails.DetailName='$DM' ORDER BY tblRestaurants.RestName ASC ")) { echo "Cannot parse query"; } elseif(mysql_num_rows($rs) == 0) { echo "No records found"; } else { echo "<table id=\"myTable\" table width=\"710\" class=\"beautifuldata\" align=\"Left\" cellspacing=\"0\">\n"; echo "<thead>\n<tr>"; echo "<th>PLACE</th>"; echo "<th>ADDRESS</th>"; echo "<th>PHONE</th>"; echo "<th>PRICE</th>"; echo "<th>RATING</th>"; echo "</tr>\n</thead>\n"; while($row = mysql_fetch_array($rs)) { echo"<tr> <td><strong><a href='$row[RestPage]'>$row[RestName]</a></strong></td> <td>$row[Address]</td> <td>$row[Phone]</td> <td>$row[Price]</td> <td>$row[Rating]</td> </tr>\n"; } echo "</table><br />\n"; } } } echo '<pre>'; var_dump($_POST) ?> It should not be this hard to build a WHERE statement based on multiple selections from a list box! Please help. I have been searching for a solution for days now. Thank you. Link to comment Share on other sites More sharing options...
kicken Posted February 9, 2013 Share Posted February 9, 2013 You have everything that I have. I gave you all of the code on my page. I gave you the tables. I don't know what else to give you. We don't know what $DM = implode(',',$selections); is, thus we can't get an accurate picture of what exactly your query is. That is why you were asked to: Post the query after the $selections has been imploded. You need to take your query text and echo it out *AFTER* your variables have been substituted into it. That way you and we can see what the final query being sent to mysql actually looks like. Link to comment Share on other sites More sharing options...
DSTR3 Posted February 9, 2013 Author Share Posted February 9, 2013 Thank you for your response. I am sorry, but I am new to this, so if you could explain or show me what you mean, I will be happy to do it and get back to you., Link to comment Share on other sites More sharing options...
kicken Posted February 9, 2013 Share Posted February 9, 2013 Change this: if(!$rs=mysql_query("SELECT tblRestaurants.RestName, tblLocations.CityID, tblLocations.AreaID, tblLocations.CuisineID, tblLocations.RestID, tblRestaurants.RestPage, CONCAT(tblLocations.StreetNumber,' ', tblLocations.Street) AS Address, tblLocations.Phone, tblLocations.Price, tblLocations.Rating, tblDetails.DetailName FROM tblRestaurants INNER JOIN tblLocations ON tblRestaurants.RestID = tblLocations.RestID INNER JOIN tblLocDet ON tblLocations.LocationID = tblLocDet.LocationID INNER JOIN tblDetails ON tblLocDet.DetailID = tblDetails.DetailID WHERE tblLocations.CityID='16' AND tblLocations.AreaID='131' AND tblLocations.CuisineID='3' AND tblDetails.DetailName='$DM' ORDER BY tblRestaurants.RestName ASC ")) { echo "Cannot parse query"; } To this: $sql = "SELECT tblRestaurants.RestName, tblLocations.CityID, tblLocations.AreaID, tblLocations.CuisineID, tblLocations.RestID, tblRestaurants.RestPage, CONCAT(tblLocations.StreetNumber,' ', tblLocations.Street) AS Address, tblLocations.Phone, tblLocations.Price, tblLocations.Rating, tblDetails.DetailName FROM tblRestaurants INNER JOIN tblLocations ON tblRestaurants.RestID = tblLocations.RestID INNER JOIN tblLocDet ON tblLocations.LocationID = tblLocDet.LocationID INNER JOIN tblDetails ON tblLocDet.DetailID = tblDetails.DetailID WHERE tblLocations.CityID='16' AND tblLocations.AreaID='131' AND tblLocations.CuisineID='3' AND tblDetails.DetailName='$DM' ORDER BY tblRestaurants.RestName ASC "; if(!$rs=mysql_query($sql)) { echo "Cannot parse query. <p>The error is: ".mysql_error()."</p><p>The query is:<br><pre>{$sql}</pre></p>"; } Then post back with what it says the error is along with the query text it shows. Link to comment Share on other sites More sharing options...
Barand Posted February 9, 2013 Share Posted February 9, 2013 (edited) All you had to do was echo " SELECT tblLocations.CityID, tblDetails.DetailName, tblRestaurants.RestName, CONCAT(tblLocations.StreetNumber,' ',tblLocations.Street) Address, tblLocations.Phone, tblLocations.Price, tblLocations.Rating, tblRestaurants.RestPage FROM (tblRestaurants INNER JOIN tblLocations ON tblRestaurants.RestID = tblLocations.RestID) INNER JOIN (tblLocDet INNER JOIN tblDetails ON tblLocDet.DetailID = tblDetails.DetailID) ON tblLocations.LocationID = tblLocDet.LocationID GROUP BY tblLocations.CityID, tblLocations.AreaID, tblLocations.CuisineID, tblDetails.DetailName, tblRestaurants.RestName, tblLocations.Street, tblLocations.Phone, tblLocations.Price, tblLocations.Rating HAVING tblLocations.CityID='16' AND tblLocations.AreaID='131' AND tblLocations.CuisineID='3' AND tblDetails.DetailName='( ' . implode(' AND ', $selections) . ' )' ORDER BY tblRestaurants.RestName ASC"; so the actual query can be seen. Not too much to ask , was it? Edited February 9, 2013 by Barand Link to comment Share on other sites More sharing options...
DSTR3 Posted February 10, 2013 Author Share Posted February 10, 2013 Barand, Not to much to ask at all, but if one does not know, because one is new, then, well you understand, kicken and Barand. I found the problem. It's this. I am running a condition on a table that can only possibly give me one answer. tblDetails. I have to run it from the tblLocDet that contains all of the records of the details as well as the locations. I am testing it now and will return. Thank you both for your help. Link to comment Share on other sites More sharing options...
DSTR3 Posted February 10, 2013 Author Share Posted February 10, 2013 OK, Closer but no cigar! I am getting all the options that are being asked for except. It's coming out as an OR not an AND. Check out this link... http://www.menuhead.net/Steelers/2Expert.php If I put "Fireplace" and Private Room(s) I should get only the places that have both. And the answer is three, But I am getting five results because it's giving me all of the places that have a "Fireplace" AND/OR Private Room(s). Here is the current code. <!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <style type="text/css"> .tblHead { background-color: #002DD1; color: white; text-align: left; } </style> </head> <body> <p> <?php if (isset ( $_POST ["btnSearch"] )) { echo "<br>Selected Options are :<br>"; $checked = $_POST ["criteria"]; $criteria = ""; $separator = ", "; for($i = 0; $i < count ( $checked ); $i ++) { echo " " . $checked [$i] . "<br/>"; if ($i == count ( $checked ) - 1) { $separator = ""; } $criteria = $criteria . "'" . $checked [$i] . "'" . $separator; } echo "<br><br>"; echo $criteria . "<br><br>"; include "config.php"; mysql_select_db ( "MyHead", $con ); //$DM = implode(',',$criteria); $mysqlQuery = "SELECT tblRestaurants.RestName, tblLocDet.LocationID, tblLocDet.DetailID, tblDetails.DetailName, tblRestaurants.RestName FROM tblRestaurants INNER JOIN (tblLocations INNER JOIN (tblLocDet INNER JOIN tblDetails ON tblLocDet.DetailID = tblDetails.DetailID) ON tblLocations.LocationID = tblLocDet.LocationID) ON tblRestaurants.RestID = tblLocations.RestID GROUP BY tblRestaurants.RestName, tblLocDet.LocationID, tblLocDet.DetailID, tblDetails.DetailName HAVING tblDetails.DetailName IN (" . $criteria . ");"; if (! $rs = mysql_query ( $mysqlQuery )) { echo "Cannot parse query"; } elseif (mysql_num_rows ( $rs ) == 0) { echo "No records found"; } else { echo "<table id=\"myTable\" table width=\"710\" class=\"beautifuldata\" align=\"Left\" cellspacing=\"0\">\n"; echo "<thead>\n<tr>"; echo "<th>PLACE</th>"; echo "<th>ADDRESS</th>"; echo "<th>PHONE</th>"; echo "<th>PRICE</th>"; echo "<th>RATING</th>"; echo "</tr>\n</thead>\n"; while ( $row = mysql_fetch_array ( $rs ) ) { echo "<tr><td><strong><a href='" . $row [RestPage] . "'>" . $row ['RestName'] . "</a></strong></td>"; echo "<td>" . $row ['DetailName'] . "</td>"; echo "<td>" . $row ['Phone'] . "</td>"; echo "<td>" . $row ['Price'] . "</td>"; echo "<td>" . $row ['Rating'] . "</td>"; echo "</tr>"; } } echo "</table><br />\n"; mysql_close ( $con ); } ?> </p> <p> </p> <p> </p> <p> </p> <form method="post" name="Critters" id="Critters"> <div align="left"> <table width="950" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <th class="tblHead" width="11" scope="col"> </th> <th class="tblHead" width="19" scope="col"> </th> <th class="tblHead" width="195" scope="col">FEATURES</th> <th class="tblHead" width="206" scope="col">MEAL PERIODS</th> <th class="tblHead" width="215" scope="col">SERVICES</th> <th class="tblHead" width="268" scope="col">TYPE OF PLACE</th> <th class="tblHead" width="51" scope="col"> </th> </tr> <tr> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Buffet" value="Buffet"> <label for="Buffet"> Buffet</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Breakfast" value="Breakfast"> <label for="Breakfast"> Breakfast</label> </strong> </td> <td><strong> <input name="criteria[]" type="checkbox" id="BYOB" value="BYOB"> <label for="BYOB"> BYOB</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Bar Scene" value="Bar Scene"> <label for="Bar Scene"> Bar Scene</label> </strong> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Fireplace" value="Fireplace"> <label for="Fireplace"> Fireplace</label> </strong> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Brunch" value="Brunch"> <label for="Brunch"> Brunch</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Catering" value="Cateringt"> <label for="Catering"> Catering</label> </strong> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Business Dining" value="Business Dining"> <label for="Business Dining"> Business Dining</label> </strong></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Great Views" value="Great Views"> <label for="Great Views"> Great Views</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Dinner" value="Dinner"> <label for="Dinner"> Dinner</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Credit Cards" value="Credit Cards"> <label for="Credit Cards"> Credit Cards</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Cheap Eats" value="Cheap Eats"> <label for="Cheap Eats"> Cheap Eats</label> </strong> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Outdoor Dining" value="Outdoor Dining"> <label for="Outdoor Dining"> Outdoor Dining</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Happy Hour" value="Happy Hour"> <label for="Happy Hour"> Happy Hour</label> </strong> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Delivery" value="Delivery"> <label for="Delivery"> Delivery</label> </strong> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Diner" value="Diner"> <label for="Diner"> Diner</label> </strong></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Private Room(s)" value="Private Room(s)"> <label for="Private Room(s)"> Private Room(s)</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Late Night" value="Late Night"> <label for="Late Night"> Late Night</label> </strong> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Food Truck / Cart" value="Food Truck / Cart"> <label for="Food Truck / Cart"> Food Truck / Cart</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Gastro-Pub" value="Gastro-Pub"> <label for="Gastro-Pub"> Gastro-Pub</label> </strong> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Raw Bar" value="Raw Bar"> <label for="Raw Bar"> Raw Bar</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Lunch" value="Lunch"> <label for="Lunch"> Lunch</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="On-Line Ordering" value="On-Line Ordering"> <label for="On-line Ordering"> On-Line Ordering</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Group Dining" value="Group Dining"> <label for="Group Dining"> Group Dining</label> </strong></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Waterfront" value="Waterfront"> <label for="Waterfront"> Waterfront</label> </strong> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Open 24 Hours" value="Open 24 Hours"> <label for="Open 24 Hours"> Open 24 Hours</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="On-Line Reservations" value="On-Line Reservations"> <label for="On-line Reservations"> On-line Reservations</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Hotel Dining" value="Hotel Dining"> <label for="Hotel Dining"> Hotel Dining</label> </strong></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Wheelchair Access" value="Wheelchair Access"> <label for="Wheelchair Access"> Wheelchair Access</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Pre / Post Theatre" value="Pre / Post Theatre"> <label for="Pre / Post Theatre"> Pre / Post Theatre</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Reservations" value="Reservations"> <label for="Reservations"> Reservations</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="Kid Friendly" value="Kid Friendly"> <label for="Kid Friendly"> Kid Friendly</label> </strong></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Wi-Fi" value="Wi-Fi"> <label for="Wi-Fi"> Wi-Fi</label> </strong></td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Take-Out" value="Take-Out"> <label for="Take-Out"> Take-Out</label> </strong> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Live Entertainment" value="Live Entertainment"> <label for="Live Entertainment"> Live Entertainment</label> </strong></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Text Ordering" value="Text Ordering"> <label for="Text Ordering"> Text Ordering</label> </strong></td> <td><strong> <input name="criteria[]" type="checkbox" id="People Watching" value="People Watching"> <label for="People Watching"> People Watching</label> </strong></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Romantic" value="Romantic"> <label for="Romantic"> Romantic</label> </strong> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Specials" value="Specials"> <label for="Specials"> Specials</label> </strong> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Sports Bar" value="Sports Bar"> <label for="Sports Bar"> Sports Bar</label> </strong> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Tasting Menu" value="Tasting Menu"> <label for="Tasting Menu"> Tasting Menu</label> </strong></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Theme" value="Theme"> <label for="Theme"> Theme</label> </strong></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td><strong> <input name="criteria[]" type="checkbox" id="Trendy" value="Trendy"> <label for="Trendy"> Trendy</label> </strong></td> <td> </td> </tr> </tbody> </table> </div> <p><input type="submit" name="btnSearch" id="btnSearch" value=" SEARCH "></p> </form> </body> </html> Link to comment Share on other sites More sharing options...
Jessica Posted February 10, 2013 Share Posted February 10, 2013 So you need to do it the same way I did in my thread. That's why I linked it. You need to structure your query the same way, because it's the only way to do that. Link to comment Share on other sites More sharing options...
Recommended Posts