Page 1 of 1

copy mysql_query resource result

Posted: Tue Feb 13, 2007 12:53 am
by orlandinho
hi

i have a little problem with results of mysql_query
i want to use the result of a mysql_query more than one time
i tried to do this:

Code: Select all

$result=mysql_query('SELECT * FROM EMP');
$temporal_result=$result;
it doesn´t work
also tried this:

Code: Select all

$result = $temporal_result = mysql_query('SELECT * FROM EMP');
it doesn´t work

what i did temporaly was execute the query twice, which is not a optimal solution

how can i reuse or manipulate a result from a query
i kwon it´s a resource but i didn´t found much info about it

i´d appreciate any help

Posted: Tue Feb 13, 2007 8:12 am
by feyd