missing-score
04-22-2003, 08:49 PM
Right, this isn't an sql question...
This may be normal, but I just wanted to make sure it is not the way I have scripted my function.
$sql = "SOME QUERY";
$query = mysql_query($sql);
for($i=1; $row = mysql_fetch_array($query); $i++)
{
// Do whatever with the info.
}
In my function, I have it set up with if/else statements to give a report of what happened. It does this fine, until there are no more rows, then it returns an error. Is this becase it is not able to fetch the row, becase it is at the end?
I hope this is clear enough for you.
If you need, I will post the function.
This may be normal, but I just wanted to make sure it is not the way I have scripted my function.
$sql = "SOME QUERY";
$query = mysql_query($sql);
for($i=1; $row = mysql_fetch_array($query); $i++)
{
// Do whatever with the info.
}
In my function, I have it set up with if/else statements to give a report of what happened. It does this fine, until there are no more rows, then it returns an error. Is this becase it is not able to fetch the row, becase it is at the end?
I hope this is clear enough for you.
If you need, I will post the function.