title: php and mysql_fetch array
body: <p>I'm having trouble with this script and I would appreciate any here:</p>
  
  <pre><code>&lt;? php
  
  //ini_set('display_errors', '1');
  
  //MQSQL connection
  require_once('../../include/init.phph');
  
  function transportQueue(){
  //siteinfoDbCon();
  siteinfoDbConNoLag();
  
  $query = "SELECT 
          a.transport_id, a.site_id, b.site_name, c.name as 'From DC', 
          d.name as 'To DC', a.cutover, a.working, a.error 
          FROM transport_queue a 
          INNER JOIN sites b ON(a.site_id=b.site_id) 
          INNER JOIN datacenters c ON(a.from_dc_id=c.datacenter_id) 
          INNER JOIN datacenters d ON(a.to_dc_id=d.datacenter_id) 
          WHERE 
          a.cutover BETWEEN NOW() AND ADDDATE(NOW(), INTERVAL 7 day) 
          ORDER BY a.cutover";
  
  //Pull results
  $results=mysql_query($query);
  
  //Return into an array $transports
  while($row=mysql_fetch_array($results,MYSQL_BOTH)){
    $transports[]=$row;
    print_r($transports[0]["site_id"]);
  }
  
  //Free up the results 
  mysql_free_result($results);
  
  //Close the db connection
  siteinfoDbClose();
  
  }
  transportQueue();
  ?&gt;
  </code></pre>
  
  <p>I can confirm that the query works and the DB connections work...  I'm at a loss.  </p>
  
  <p>I'm trying to return the results into an associative array.  I did review the following question/answer:  <a href="https://stackoverflow.com/questions/8611207/dump-mysql-fetch-array-results-into-a-multidimensional-array">Dump mysql_fetch_array results into a multidimensional array</a></p>
  
  <p>Trying to </p>
  
  <p>Any thoughts?</p>