Jump to content

Archived

This topic is now archived and is closed to further replies.

svad

Embedding mysql functions

Recommended Posts

If this works:

 

$result = mysql_query($sql);

while ($array = mysql_fetch_array($result) { // do something }

 

Why doesn\'t this work?

 

while ($array = mysql_fetch_array(mysql_query($sql)) { }

Share this post


Link to post
Share on other sites

Are you using SELECT,SHOW,DESCRIBE or EXPLAIN statements in your sql statement?

 

What\'s the error message?

 

Does the SQL statement return valid data?

Share this post


Link to post
Share on other sites

That doesnt work because you have to actually perform the query first

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.