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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Only this query won't work within PHP 1

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 ...

The query works via command line but not within PHP!

What's the catch?

Thanks! :)

 
this means that $db_connect is not a connection handle. perhaps it is not available inside the function you are using.

try omitting it, or otherwise check its scope.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top