techiefreak05 Posted November 25, 2006 Share Posted November 25, 2006 i need to select something for the database where the image id is a certain thing and the user id is a certain thing .. and IDK the correct syntax for checking the table against 2 things .. herees my code.. and it doesnt work[code]$sql = "SELECT * FROM `imageHeadlines` WHERE `userID` = '$_SESSION[id]', `id` = '$imgID'";[/code] Quote Link to comment https://forums.phpfreaks.com/topic/28404-sql-syntax-error/ Share on other sites More sharing options...
.josh Posted November 25, 2006 Share Posted November 25, 2006 [code]$sql = "SELECT * FROM imageHeadlines WHERE userID = '{$_SESSION['id']}' AND id = '$imgID'";[/code]p.s. - moving to sql forum. Quote Link to comment https://forums.phpfreaks.com/topic/28404-sql-syntax-error/#findComment-129949 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.