Use 3 AND in mysql query
#1

Hi,

How use 3 and in mysql query, because it now working if doing like that:

select xp from table where name='xxx' AND money='555' AND air='22'
Reply
#2

Try this:
PHP код:
select xp from table where name='xxx' money='555' AND air='22' 
Reply
#3

I get syntax error.
Reply
#4

I guess column money and air are integer, so you can escape the '.

SELECT `xp` FROM `table` WHERE `name`='xxx' AND `money`=555 AND `air`=22
Reply
#5

But if they not will be integer i just give example i could use any collum type i just need to know how to use where where i need to use 3 and or more.
Reply
#6

Код:
SELECT * FROM `somewhere` WHERE (`something`=2 AND `something2`=2 AND `something3`='string')
Reply
#7

Thanks working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)