Well, I am feeling very pleased about using
Where $no_query_less is either empty orPHP Code:SELECT ts_opts.option_name
, ts_opts.option_value
FROM ( SELECT option_name
, option_value
FROM $wpdb->options
WHERE autoload NOT LIKE 'yes'
AND option_name LIKE 'rss\_%\_ts'
$no_query_less
) AS ts_opts
UNION ALL
SELECT non_ts_rss_opts.option_name
, NULL
FROM ( SELECT option_name
FROM $wpdb->options
WHERE autoload NOT LIKE 'yes'
AND option_name LIKE 'rss\_%'
AND option_name NOT LIKE 'rss\_%\_ts'
$no_query_less
) AS non_ts_rss_opts
The experience has taught me more about how MySQL works and how to optimize a query to minimize resource use.PHP Code:ORDER BY option_id DESC LIMIT " . ($query_limit / 2)
Unfortunately the same plugin user is still having problems, this time a syntax error near FROM ( SELECT option_name , option_value
He has MySQL 4 something so I need to find out if there are syntactial differences between different versions and/or engines.
Another day, another puzzle.








Bookmarks