Below is statement which executes my query and returns a resource.
$Result = mysql_query($Query);
I want to get clone of $Result.
How can I get its clone?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you got in $Result is not really a cloneable resource, but a reference to a cursor that points to a position in a result set (meaning if you copy it and advance in one copy, it’ll have advanced in the other as well). Assuming you want to read the same query results twice without repeating the query, this post might help:
How to reset mysql pointer back to the first row in PHP?