How mysql_query works

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
sudesh_poojari
Forum Newbie
Posts: 3
Joined: Tue Jun 17, 2008 12:20 pm

How mysql_query works

Post 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.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: How mysql_query works

Post 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.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: How mysql_query works

Post by Darhazer »

You can read this, it may be interesting for you:
http://bg2.php.net/manual/en/function.m ... -query.php
sudesh_poojari
Forum Newbie
Posts: 3
Joined: Tue Jun 17, 2008 12:20 pm

Re: How mysql_query works

Post 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
Post Reply