scarface83 Posted April 10, 2007 Share Posted April 10, 2007 can anyone tell me where im going wrong ? level is in a different table ! $team_names = mysql_query("SELECT TeamRef,Teamname FROM a_team WHERE In_use='Y' AND Area='1' AND a_users.Level='0' ORDER BY Teamname "); Thanks Link to comment https://forums.phpfreaks.com/topic/46486-mysql-help/ Share on other sites More sharing options...
per1os Posted April 10, 2007 Share Posted April 10, 2007 AND a_users.Level='0' You do not have a join to the table a_users, that and it is not in the from statement. Link to comment https://forums.phpfreaks.com/topic/46486-mysql-help/#findComment-226148 Share on other sites More sharing options...
scarface83 Posted April 10, 2007 Author Share Posted April 10, 2007 what would i need to put ? Link to comment https://forums.phpfreaks.com/topic/46486-mysql-help/#findComment-226149 Share on other sites More sharing options...
scarface83 Posted April 10, 2007 Author Share Posted April 10, 2007 AND a_users.Level='0' You do not have a join to the table a_users, that and it is not in the from statement. would this do it ? $team_names = mysql_query("SELECT a_team.TeamRef,a_team.Teamname FROM a_team LEFT JOIN a_users WHERE a_team.In_use='Y' AND a_team.Area='1' AND a_users.Level='0' ORDER BY Teamname ") Link to comment https://forums.phpfreaks.com/topic/46486-mysql-help/#findComment-226155 Share on other sites More sharing options...
scarface83 Posted April 10, 2007 Author Share Posted April 10, 2007 anyone ???? Link to comment https://forums.phpfreaks.com/topic/46486-mysql-help/#findComment-226171 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.