Would this query be correct?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Would this query be correct?

Post by anthony88guy »

Can you use less/greater then or equal to in your query?
Last edited by anthony88guy on Thu May 12, 2005 6:08 pm, edited 1 time in total.
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Code: Select all

mysql_query("SELECT * FROM farms WHERE defenceaction <= '$fdefenceaction' && armysize >= '$farmysize'") or die(mysql_error());
I believe && is not valid in mysql, use AND.
Post Reply