Jump to content

error message


optikalefx

Recommended Posts

PHP Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hermes/web04/b1609/pow.4ten/htdocs/newupdate.php on line 22

 

I was using this code

$con = mysql_connect("server","username","password"); 
mysql_select_db("update1", $con);
$sql = mysql_query("SELECT * FROM headings WHERE user='$user'");

 

and then i added above that

$con2 = mysql_connect("sameserver","username","pass"); 
mysql_select_db("4tenclients", $con2);
$sql2 = mysql_query("SELECT * FROM websites WHERE table='$user'");

 

I have to log into 2 databases one is a client database the other holds other info.

 

any idea why im getting an error?  basically the 4tenclients isnt giving me any data but the other one is, ive quintouple checked all my variables and row names and usernames and such, im stumped

 

Link to comment
https://forums.phpfreaks.com/topic/67173-error-message/
Share on other sites

Try this..

 

$con2 = mysql_connect("sameserver","username","pass");

mysql_select_db("4tenclients", $con2);

$sql2 = mysql_query("SELECT * FROM websites WHERE table='$user'")or die("Could not select the table");

 

WHERE table='$user'"-the 'table' STANDS FOR ANY ANY FEILD.

Link to comment
https://forums.phpfreaks.com/topic/67173-error-message/#findComment-336968
Share on other sites

Archived

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

×
×
  • Create New...

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.