select help - multiple where/limits

2004-03-18 Thread Kris Burford
hi wondering whether someone can set me straight on whether it's possible to request a set of records from a single table with multiple conditions. for instance, a "story" table, containing id, title, text, section and published_date. what i would like is to retrieve is the 5 most recently pub

Re: Query Optimization [sorted]

2004-03-13 Thread kris burford
I'm trying to sort out a query that identifies images that are not in the story table (structures below). Peter Brawley has kindly pointed me in the right direction with the sql structure (which does work), but I'm getting benchmarks of 5+ seconds on the test data, whereas the live site has 50x

Query Optimization

2004-03-13 Thread Kris Burford
Hi, I'm trying to sort out a query that identifies images that are not in the story table (structures below). Peter Brawley has kindly pointed me in the right direction with the sql structure (which does work), but I'm getting benchmarks of 5+ seconds on the test data, whereas the live site has

Re: query reference help

2004-03-12 Thread kris burford
SELECT i.id, i.image_name, i.image_width, i.image_height, s.id as story_id, s.title FROM images i LEFT JOIN stories s ON s.body like '[img]' + i.image_name + '[/img]' WHERE i.image_name like '%$search%' ORDER by i.image_name peter wrote: Is ...LIKE '%[img]' + i.image_name + '[/i

query reference help

2004-03-12 Thread Kris Burford
stories (which i *know* exist). i'm guessing that it's something to do with the ON clause, but i don't understand what's wrong. many thanks kris -- kris burford midtempo ltd http://www.midtempo.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]