a1amattyj Posted August 15, 2008 Share Posted August 15, 2008 Hello, Two tables, multi_admins and multi_permissions, trying to select a single row from each table where the ID is specified. SELECT * FROM `multi_admins` INNER JOIN `multi_permissions` ON `multi_admins.id` = `multi_permissions.admin_id` WHERE `multi_admins.id` = '".clean_up($_SESSION['id'])." Wondering if anyone can help, first stab at a join statement. Thanks! Quote Link to comment Share on other sites More sharing options...
toplay Posted August 15, 2008 Share Posted August 15, 2008 Watch where you put the backtick marks. $sql = "SELECT * FROM `multi_admins` INNER JOIN `multi_permissions` ON `multi_admins`.id = `multi_permissions`.admin_id WHERE `multi_admins`.id = '" . clean_up($_SESSION['id']) . "'"; Quote Link to comment Share on other sites More sharing options...
a1amattyj Posted August 15, 2008 Author Share Posted August 15, 2008 Watch where you put the backtick marks. $sql = "SELECT * FROM `multi_admins` INNER JOIN `multi_permissions` ON `multi_admins`.id = `multi_permissions`.admin_id WHERE `multi_admins`.id = '" . clean_up($_SESSION['id']) . "'"; Thanks, works perfectly! Quote Link to comment 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.