RE: [PHP] mysql_list_fields() bug?
| From: | Jay Blanchard | Date: | Tue, 11 Nov 2003 12:30:48 +0000 |
| Subject: | RE: [PHP] mysql_list_fields() bug? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169165@lists.php.net to get a copy of this message | ||
[snip]
Ok, this ended up working well. I'm still wondering why in my example
function two() works, without needing to provide the resource identifier
to mysql_query(), how can mysql_query() pick up the resource identifier
automatically while mysql_list_fields does not?
[/snip]
From http://www.php.net/mysql_query
"mysql_query() sends a query to the currently active database on the
server that's associated with the specified link identifier. -->If
link_identifier isn't specified, the last opened link is assumed.<-- If
no link is open, the function tries to establish a link as if
mysql_connect() was called with no arguments, and use it. The result of
the query is buffered."
mysql_list_fields() does not automagically use the "last opened link"