Page 1 of 1
if's and mysql
Posted: Sun Oct 06, 2002 1:24 pm
by evilmonkey
Hello. I'm pretty new to this whole PHP thing, so I have a question. I want to make a script that displays ONLY the 1 field from a row (SELECT field from ROW), but only if the row has a validation id of 'yes'. I have auto-incremented ids. So generally, if the field 'validation' has a value of 'no', the data will not be displayed. Can someone tell me how I can structure an 'if' for this?
Thanks.
Posted: Sun Oct 06, 2002 1:27 pm
by hob_goblin
use "where"
SELECT * FROM table WHERE something = 'yes'
Posted: Sun Oct 06, 2002 1:38 pm
by evilmonkey
Ok then how do I pass the id?
Posted: Sun Oct 06, 2002 1:44 pm
by Takuma
You don't need to pass id do you? if you do what for?
Posted: Sun Oct 06, 2002 1:52 pm
by evilmonkey
Yeah, I think you're right.
I'll make the code and see. My brain picture is a little clouded right now. If I need to pass the id, the EVIL MONKEY will be back!!!
J/K
Thanks.