MySQL WHERE Clause Help
Go to solution
Solved by elpiop,
16 minutes ago, DriedSponge said:I know this is probably really simple but I'm having troubble figuring out how to select a row from a MySQL db where multiple columns equal a certain value. Here's what I have, I'm using PHP PDO:
$query = SQLWrapper()->prepare("SELECT postid,Images FROM ImagePost WHERE gid = :gid, Title = null, Category = null,Caption=null");Any help would be apprciated! Thank you!
Use AND instead of comma
SELECT postid, Images FROM ImagePost WHERE gid = :gid AND Title = null AND Category = null AND Caption = null
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now