Use 3 AND in mysql query - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Use 3 AND in mysql query (
/showthread.php?tid=602386)
Use 3 AND in mysql query -
CSCripMa - 06.03.2016
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'
Re: Use 3 AND in mysql query -
jlalt - 06.03.2016
Try this:
PHP код:
select xp from table where name='xxx' , money='555' AND air='22'
Re: Use 3 AND in mysql query -
CSCripMa - 06.03.2016
I get syntax error.
Re: Use 3 AND in mysql query -
kadaradam - 06.03.2016
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
Re: Use 3 AND in mysql query -
CSCripMa - 06.03.2016
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.
Re: Use 3 AND in mysql query -
DRIFT_HUNTER - 06.03.2016
Код:
SELECT * FROM `somewhere` WHERE (`something`=2 AND `something2`=2 AND `something3`='string')
Re: Use 3 AND in mysql query -
CSCripMa - 06.03.2016
Thanks working