jsteiner87
Programmer
I have my mysql recordset and I want to loop thru the recordset and display the data in a table with a set of condtions. I want to then loop thru the recordset again and display the data again but with a different set of conditions.
Here is basically what I have:
$query_rsMysql = "SQL Statemet";
$rsMysql = mysql_query($query_rsMysql, $database) or die(mysql_error());
$row_rsMysql = mysql_fetch_assoc($rsMysql);
//Then I want to loop thru the recordset twice.
do {
if (some condition is true) {
//Display something here from databse table
}
}while ($row_rsMysql = mysql_fetch_assoc($rsMysql));
do {
if (some other condition is true) {
//Display something here from database table
}
}while ($row_rsMysql = mysql_fetch_assoc($rsMysql));
I don't have the code in front of me so I wrote it out with the same structure and everything.
Here is basically what I have:
$query_rsMysql = "SQL Statemet";
$rsMysql = mysql_query($query_rsMysql, $database) or die(mysql_error());
$row_rsMysql = mysql_fetch_assoc($rsMysql);
//Then I want to loop thru the recordset twice.
do {
if (some condition is true) {
//Display something here from databse table
}
}while ($row_rsMysql = mysql_fetch_assoc($rsMysql));
do {
if (some other condition is true) {
//Display something here from database table
}
}while ($row_rsMysql = mysql_fetch_assoc($rsMysql));
I don't have the code in front of me so I wrote it out with the same structure and everything.