title: Joining MySQL Queries
body: <p>I am having trouble joining two queries together these are my queries:</p>
  
  <pre><code>$sql = "SELECT SourcePath, Description, BikeCode FROM BikeImages order by bikecode";
  $sql1 = "SELECT BikeCode, Manufacturer, Model, SubType, Year, FrameMaterial, Description, Gender, Type, Price, Stock FROM Bike WHERE Stock &gt; 0";
  $result = mysqli_query($con, $sql);
  $result1 = mysqli_query($con, $sql1);
  </code></pre>
  
  <p>Help would be really appreciated, I have had a couple of ideas to join them together such as </p>
  
  <pre><code>$result = mysqli_query($sql &amp;&amp; $sql1, $con);
  </code></pre>
  
  <p>But it doesn't seem to work, Should I join the two $sql together if so how would I do that?</p>
  
  <p>EDIT: The tables are related because I want to create a while loop, that displays all the information from the Bike table and then grabs the images from the BikeImages table related to each individual BikeCode.</p>
  
  <p>After linking the tables together I wish to use this code to display my information:</p>
  
  <pre><code>while(list($bikecode, $manufacturer, $model, $subtype, $year, $fmaterial, $desc, $gender, $type, $price, $stock, $sourcepath, $description) = mysqli_fetch_row($result1)) {   
  echo "information here  
  }
  </code></pre>
  
  <p>Thanks</p>