title: Calling MYSQL CREATE VIEW using php code?
body: <p>need some enlightment here, and this is my first post here.</p>
  
  <p>I would like to call and use my previously created mysql view using php... is it possible?
  or in another words,
  i'm wondering....can we OR how do we call mysql view, that we already created using php? to reduce long query coding</p>
  
  <p>standard generic codes as follow :</p>
  
  <pre><code>$sql= " SELECT shipping.tarrif1, city.city_name
           FROM shipping JOIN city
     ON shipping.id_city = city.id_city";
  $db-&gt;QueryArray($sql);   
  
  while ($row = $db-&gt;Row()) {
  echo $row-&gt;city_name. " - " . $row-&gt;tarrif1 . "&lt;br /&gt;\n"; 
  }
  </code></pre>
  
  <p>now for the MYSQL VIEWS :</p>
  
  <pre><code>$sql= " CREATE VIEW shipsumarry AS SELECT shipping.tarrif1, city.city_name
           FROM shipping JOIN city
     ON shipping.id_city = city.id_city";
  </code></pre>
  
  <p>Pure MYSQL command :</p>
  
  <pre><code>query: SELECT * FROM shipsummary
  </code></pre>
  
  <p>IN PHP :</p>
  
  <pre><code> $sql = i'm badly stuck here...please help
  </code></pre>
  
  <p>How do we access it using php.</p>
  
  <p>thanks before</p>
  
  <p>Addition 1:</p>
  
  <p>ok... let me rewrite the example :</p>
  
  <pre><code>$sql1= " CREATE VIEW shipsumarry AS SELECT shipping.tarrif1, city.city_name
           FROM shipping JOIN city
     ON shipping.id_city = city.id_city";
  $sql2= "SELECT * FROM shipsummary";
  $db-&gt;QueryArray($sql2);
  </code></pre>
  
  <p>$sql2 can not see shipsummary VIEW, coz it's already in a different var</p>
  
  <p>how to utilise and then execute $sql1 ? &amp; $sql2?</p>