Jump to content

question about mysql_select_db


desjardins2010

Recommended Posts

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

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.