optikalefx Posted August 29, 2007 Share Posted August 29, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/67173-error-message/ Share on other sites More sharing options...
suma237 Posted August 29, 2007 Share Posted August 29, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/67173-error-message/#findComment-336968 Share on other sites More sharing options...
chanchelkumar Posted August 31, 2007 Share Posted August 31, 2007 please help meeeeeeeeeeeeee Quote Link to comment https://forums.phpfreaks.com/topic/67173-error-message/#findComment-338495 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.