Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Is this correct syntax?

Name: Anonymous 2011-10-10 1:28

quick question. Is this a syntax correct MySQL statement?:
SELECT * FROM table WHERE value1 ='$value1' AND WHERE value2 ='$value2'? Is that how I would specify more than one database search option? I just started MySQL yesterday so don't judge.

Name: Anonymous 2011-10-10 1:29

shit sorry for not enclosing it in code tags. Mind fuck.

Name: Anonymous 2011-10-10 1:30

I think you only need one WHERE. Are you able to run it?

Name: Anonymous 2011-10-10 1:32

I think so. But say I wanted to specify more than one search option how would I go about doing it?

Name: Anonymous 2011-10-10 1:54

>>1
No, this is incorrect. You must use bound variables instead of string interpolation.

As >>3 points out, WHERE only appears once. AND ... is part of the clause.

Name: ahaha 2011-10-10 5:42

your probably that fag from yesterday using backticks.
I'm judging; you are a faggot and need to read tutorials.

Name: Anonymous 2011-10-10 5:45

>>6
WHNBT.

Name: Anonymous 2011-10-10 6:30

2nd day of MySQL and already a SQL injection vulnerability. You will fit right in with the ``Web developer'' crowd.

Name: Anonymous 2011-10-10 8:29

>>8
He just started MySQL yesterday so don't judge.

Don't change these.
Name: Email:
Entire Thread Thread List