Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show tables not working

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR
Hello,

Could someone tell me why

Code:
    $sql_query = "
    show tables like 'mod_rates_%'
    ";
    $query_result = mysql_query($sql_query, $_db_connect) or die ($sql_query);

... produces this :

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource ...

I'm using mySQL 5.0 on Win Vista

Thanks! :)

 
Hi r937 :)

Yeah, it works directly in mySQL but I don't see why it doesn't work within PHP.

This does work though :

Code:
$sql_result = mysql_query("show tables like 'mod_%'", $GLOBALS["_db_connect"]);
    
while ($row[1] = mysql_fetch_array($sql_result)) {
...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top