Monday, April 23, 2007

It's been a while...

...So here is a post of decent length.

1. I like it that some people still know that "Howdy!" is verbal shorthand for "How do you do?" and respond appropriately.

2. Coda from Panic Software looks veeeeeeery interesting.

3. SQL is interesting stuff. I have been working playing with ExpressionEngine for a little while now, and it lets you execute custom SQL queries and loops through them for you. I worked all bloody day on one that needs no fewer than seven tables to spit out six fields. I am betting my query can be slimmed down. if anyone wants to take a crack at it, here it is:

SELECT t.title, t.url_title, d.field_id_13, d.field_id_16, g.gallery_image_url, gc.cat_folder, ge.filename, ge.extension
FROM exp_weblog_data AS d
LEFT JOIN exp_category_posts AS cp ON cp.entry_id = d.entry_id
LEFT JOIN exp_weblog_titles AS t ON t.entry_id = d.entry_id
LEFT JOIN exp_relationships AS r ON r.rel_id = d.field_id_16
LEFT JOIN exp_gallery_entries AS ge ON r.rel_child_id = ge.entry_id
LEFT JOIN exp_galleries AS g ON g.gallery_id = ge.gallery_id
LEFT JOIN exp_gallery_categories AS gc ON gc.cat_id = ge.cat_id
WHERE t.status = 'open' AND d.weblog_id = '6' and cp.cat_id = '11'
ORDER BY t.entry_date
DESC LIMIT 6

and, yes, it works.

No comments:

Post a Comment