desjardins2010 Posted January 8, 2011 Share Posted January 8, 2011 hey curious this code here i'm using from another script to make things quicker for me however the two querys here were on the other script picking from the same place IE: members in table heaven_users this new script however will need the forst query for pull from heaven_npc so i tried $query = mysql_query("SELECT * FROM 'heaven_users' 'members' WHERE username='$player'"); this script below given this error "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''heaven_users' 'members' WHERE username='solidsoul'' at line 1 " here the whole script include('connectnpc.php'); $query = mysql_query ("SELECT * FROM npcs WHERE ipaddress='$npcip'") or die (mysql_error()); $query2 = mysql_query ("SELECT * FROM 'heaven_users' 'members' WHERE username='$player'") or die (mysql_error()); the connectnpc.php connects and sleects heave_npc Link to comment https://forums.phpfreaks.com/topic/223737-question-about-mysql_select_db/ Share on other sites More sharing options...
desjardins2010 Posted January 8, 2011 Author Share Posted January 8, 2011 opps no there is the . in between them 'heaven_users' . 'members' Link to comment https://forums.phpfreaks.com/topic/223737-question-about-mysql_select_db/#findComment-1156504 Share on other sites More sharing options...
desjardins2010 Posted January 8, 2011 Author Share Posted January 8, 2011 that still don't work Link to comment https://forums.phpfreaks.com/topic/223737-question-about-mysql_select_db/#findComment-1156510 Share on other sites More sharing options...
BlueSkyIS Posted January 8, 2011 Share Posted January 8, 2011 $sql = "SELECT * FROM 'heaven_users.members' WHERE username='$player'"; $query = mysql_query($sql) or die(mysql_error() . " IN $sql"); Link to comment https://forums.phpfreaks.com/topic/223737-question-about-mysql_select_db/#findComment-1156514 Share on other sites More sharing options...
desjardins2010 Posted January 8, 2011 Author Share Posted January 8, 2011 thanks alot.. Link to comment https://forums.phpfreaks.com/topic/223737-question-about-mysql_select_db/#findComment-1156524 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.