title: Simple MySQL Select Query Issue in Laravel
body: <p>Here is my Laravel Query for dropdown</p>
  
  <p>Where i get the <code>$CountryID</code> and select the region name from the region table displaying it in the select box</p>
  
  <p>But i don't know how to use <code>where</code> condition here</p>
  
  <p>What is the mistake  i am doing ? </p>
  
  <pre><code>$CountryID = Input::get('CountryID');
  $roles = DB::table('region')-&gt;lists('regionname');
  foreach ($roles as $value) 
  {
  echo "&lt;option value=".$value."&gt;".$value."&lt;/option&gt;";
  }
  echo "&lt;/select&gt;";
  }
  </code></pre>
  
  <h2>Query : In Simple Words</h2>
  
  <p>How to change this query </p>
  
  <pre><code>$roles= DB::select( DB::raw("SELECT regionname FROM region WHERE CountryID = '$CountryID'") );
  </code></pre>
  
  <p>To Native Query :</p>
  
  <pre><code>$roles = DB::table('region')-&gt;lists('regionname');
  </code></pre>
  
  <p>Note : 
  Now i am getting all the fields in the region  table</p>