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] 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. Link to comment https://forums.phpfreaks.com/topic/28404-sql-syntax-error/#findComment-129949 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.