I wonder if it is possible to reuse the identifier of a mysql query result. I want to use it for displaying data that gets deleted before the data will be deleted. but the result is needed 2 times then...
like:
$result = $this->db->query ("SELECT * FROM Users WHERE points = -1;");
$this->db->createHtmlFromResult ($result);
while ($row = mysql_fetch_array ($result))
{
// check user info - bad - delete
}
the functions used here are from a class i wrote - i think they're quite self explaning. I just want to do this for a user interface - then the user can print out possible candidates of deletion AND the ones really deleted.
There are 3 solutions i think
1. use the same query two times...
2. create an intelligent query that deletes the users instead of going through a loop
3. rewind the mySQL result id like it is possible with filepointers (that's what i want to know if it's possible)
thanks in advance for any kick into the right direction
Yours
HTD
like:
$result = $this->db->query ("SELECT * FROM Users WHERE points = -1;");
$this->db->createHtmlFromResult ($result);
while ($row = mysql_fetch_array ($result))
{
// check user info - bad - delete
}
the functions used here are from a class i wrote - i think they're quite self explaning. I just want to do this for a user interface - then the user can print out possible candidates of deletion AND the ones really deleted.
There are 3 solutions i think
1. use the same query two times...
2. create an intelligent query that deletes the users instead of going through a loop
3. rewind the mySQL result id like it is possible with filepointers (that's what i want to know if it's possible)
thanks in advance for any kick into the right direction
Yours
HTD