Date: 07/08/01
- Next message: zerosumzero <email protected>: "Re: [PHP] multiple outputs to mysql_query()"
- Previous message: eschmid+sic <email protected>: "Re: [PHP] Next Book"
- Next in thread: zerosumzero <email protected>: "Re: [PHP] multiple outputs to mysql_query()"
- Reply: zerosumzero <email protected>: "Re: [PHP] multiple outputs to mysql_query()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
i want my mysql query result to output 2 mysql output rows for every <tr>
set. I'm used to just doing a do/while statement for a single mysql output
per row.
example:
//the code i have essentially does this
-----------------------------------------
<?php
echo '<table>';
$result = mysql_query("SELECT * from table WHERE type='default'");
do {
echo '<tr><td>
' . $myresult[column] .
'</td></tr>';
} while ($myresult == mysql_fetch_array($result));
echo '</table>';
?>
--------------------
//outputs:
<table>
<tr>
<td>data for row 1</td>
</tr>
<tr>
<td>data for row 2</td>
</tr>
...etc...
</table>
-------------------------------------------
i want it to output like this:
<table>
<tr>
<td>data for row 1</td>
<td>data for row 2</td>
</tr>
<tr>
<td>data for row 3</td>
<td>data for row 4</td>
</tr>
...etc...
</table>
------------------------------------------
if anyone can help me with alternating like this or knows where i can find a
resource tutorial on it please tell me..
thanks
-Adam
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: zerosumzero <email protected>: "Re: [PHP] multiple outputs to mysql_query()"
- Previous message: eschmid+sic <email protected>: "Re: [PHP] Next Book"
- Next in thread: zerosumzero <email protected>: "Re: [PHP] multiple outputs to mysql_query()"
- Reply: zerosumzero <email protected>: "Re: [PHP] multiple outputs to mysql_query()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

