Jump to content

[SOLVED] What's wrong with this MySQL query?


katlis

Recommended Posts

SELECT * FROM horses WHERE status='1' (AND discipline='%jumper%' OR discipline='%dressage%') AND breed = 'Warmblood' ORDER BY showname ASC LIMIT 0, 20

 

The discipline column has comma separated values such as "jumper,hunter" .. or.. "dressage,jumper,hunter prospect" hence the wild cards.

 

Yet this doesn't select anything from the table.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.