Page 1 of 1

How mysql_query works

Posted: Wed Jul 22, 2009 3:09 am
by sudesh_poojari
Hi,

(I hope i have posted in the right section)

I would like how below code would work

$result = mysql_query('select * from table');

does php store all rows return by this query in the $result obj?

Just curious.

Re: How mysql_query works

Posted: Wed Jul 22, 2009 3:20 am
by onion2k
Write some code to find out ... connect to the database, do the query, then disconnect from the database ... if you can still access the records in $result you'll know that they're being stored by PHP.

Re: How mysql_query works

Posted: Wed Jul 22, 2009 3:36 am
by Darhazer
You can read this, it may be interesting for you:
http://bg2.php.net/manual/en/function.m ... -query.php

Re: How mysql_query works

Posted: Wed Jul 22, 2009 3:50 am
by sudesh_poojari
onion2k wrote:Write some code to find out ... connect to the database, do the query, then disconnect from the database ... if you can still access the records in $result you'll know that they're being stored by PHP.
thx it was so simple

and thx darhazer