title: How do I show all the results from an SQL statement?
body: <p>I wanted to display all of my shirts but I always get the same error</p>
  
  <pre><code>Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /homepages/36/d362778419/htdocs/home/specials.php on line 34
  </code></pre>
  
  <p>Here is the code I have currently in place</p>
  
  <pre><code>&lt;?php
  require "connect2.php";
  
  $sql = mysql_query("SELECT * FROM shirts WHERE all='1'");
  $runrows = mysql_fetch_array($sql); 
  $title = $runrows['title'];
  
  $picture = $runrows['picture'];
  
  $newp = $runrows['newp'];
  
  $date = strftime("%b %d, %Y %l:%M %p" ,strtotime($runrows['date']));
  
  $oldp=$runrows['oldp'];
  
  $viewl=$runrows['viewl'];
  
  $shirtl = $runrows['shirtl'];
  echo "";
  ?&gt;
  
  &lt;div class="specialsListBoxContents centeredContent back" style="width:25%;"&gt;&lt;div class="product-col" &gt;             &lt;div class="img"&gt;           
  
          &lt;a href="detail.php?id=&lt;?php echo $id; ?&gt;"&gt;&lt;img src="&lt;?php echo $picture; ?&gt;" alt="&lt;?php echo $title; ?&gt;" title=" &lt;?php echo $title; ?&gt; " width="190" 
  
  height="160" /&gt;&lt;/a&gt;             &lt;/div&gt;              &lt;div class="prod-info"&gt;                 &lt;div class="wrapper"&gt;       
  
                  &lt;div class="price"&gt;                         &lt;strong&gt;&lt;span class="normalprice"&gt;&lt;?php echo $oldp; ?
  
  &gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="productSpecialPrice"&gt;&lt;?php echo $newp; ?&gt;&lt;/span&gt;&lt;/strong&gt;                        &lt;/div&gt;                  
  
      &lt;div class="button"&gt;&lt;a href="detail.php?id=&lt;?php echo $id; ?&gt;"&gt;&lt;img src="images/button_add_to_cart.gif" alt="Add to Cart" title=" Add to Cart " width="54" 
  
  height="49" /&gt;&lt;/a&gt;&lt;/div&gt;                    &lt;/div&gt;              &lt;/div&gt;          &lt;/div&gt;&lt;/div&gt;
  
  &lt;?php
  ?&gt;
  </code></pre>