Note that there are some explanatory texts on larger screens.

plurals
  1. POMultidimensional Arrays two loops
    primarykey
    data
    text
    <p>MSSQL query link is this; <a href="http://img521.imageshack.us/img521/9280/sqlsecreen.png" rel="nofollow">click here for picture</a></p> <p>and my output shows three different pictures for the same product as shown below. What I want is, if the product is the same, keep just one picture and then get the colors and sizes for that product. </p> <p>Means;</p> <p>My output ıs the picture below,</p> <p><a href="http://img337.imageshack.us/img337/1445/while.png" rel="nofollow">click here for picture</a></p> <p>as you see there are three product in the picture but they are the same product with different colors and sizes, instead of seeing the same product every time, I want my output like in the picture below.</p> <pre> </pre> <pre><code>&lt;table width="376" cellspacing="0" class="stats" width:100%&gt; &lt;tr&gt; &lt;td colspan="9" align="center"&gt;&lt;?php echo $secim ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php while(odbc_fetch_into($sql_result, &amp;$row)) { $unit1 = floor($row[3]); $unit2 = floor($row[4]); $unit3 = floor($row[5]); $unit4 = floor($row[6]); $unit5 = floor($row[7]); ?&gt; &lt;tr&gt; &lt;td colspan="2" align="left" valign="top"&gt;&lt;?php echo"$row[0]";?&gt;&lt;/td&gt; &lt;td&gt;36&lt;/td&gt; &lt;td&gt;38&lt;/td&gt; &lt;td&gt;40&lt;/td&gt; &lt;td&gt;42&lt;/td&gt; &lt;td&gt;44&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="114" align="right" valign="top"&gt; &lt;img src= &lt;?php echo"images/Resize/$row[2]"?&gt;&gt;&lt;/td&gt; &lt;td width="25" valign="top"&gt;&lt;?php echo"$row[1]";?&gt;&lt;/td&gt; &lt;td width="25"valign="top"&gt;&lt;?php echo"$unit1";?&gt;&lt;/td&gt; &lt;td width="25"valign="top"&gt;&lt;?php echo"$unit2";?&gt;&lt;/td&gt; &lt;td width="25"valign="top"&gt;&lt;?php echo"$unit3";?&gt;&lt;/td&gt; &lt;td width="25"valign="top"&gt;&lt;?php echo"$unit4";?&gt;&lt;/td&gt; &lt;td width="25"valign="top"&gt;&lt;?php echo"$unit5";?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } }?&gt; &lt;?php odbc_free_result($sql_result); odbc_close($connection); ?&gt; &lt;/table&gt; </code></pre> <pre> </pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload