Vermillion Posted September 5, 2008 Share Posted September 5, 2008 "SELECT * FROM access WHERE user_id = '$id', hash = '$hash' AND level = 8"; Like you can see, I want to "SELECT everything from access where the id is $id, the hash is $hash, and the level is 8", but that doesn't work. How would be the right way to do that? Quote Link to comment Share on other sites More sharing options...
corbin Posted September 5, 2008 Share Posted September 5, 2008 AND where user_id = '$id' AND hash = '$hash'...... Quote Link to comment Share on other sites More sharing options...
Vermillion Posted September 5, 2008 Author Share Posted September 5, 2008 So I just keep using the AND clause? Okay, thanks al lot . Quote Link to comment Share on other sites More sharing options...
Vermillion Posted September 7, 2008 Author Share Posted September 7, 2008 Woops one thing. If I wanted to update the database with multiple different values, would I do something like this: "UPDATE members SET question = '$newquestion'" AND SET answer = '$answer' WHERE id = "$id" AND hash = '$hash'" ? Or can I only do: "UPDATE members SET question = '$newquestion'" SET answer = '$answer' WHERE id = "$id" AND hash = '$hash' Quote Link to comment Share on other sites More sharing options...
BigTime Posted September 7, 2008 Share Posted September 7, 2008 UPDATE members SET question='$newquestion', answer='$answer' WHERE id='$id' AND hash='$hash' 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.