SQL error fix from MikeLittle. fixes #1711

git-svn-id: https://develop.svn.wordpress.org/trunk@2931 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-10-05 22:48:51 +00:00
parent 2c32adcc6e
commit 36183456c1
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
if ( $optiondates ) { if ( $optiondates ) {
$cat_dates = $wpdb->get_results(" SELECT category_id, $cat_dates = $wpdb->get_results(" SELECT category_id,
UNIX_TIMESTAMP( MAX(post_date) ) AS ts UNIX_TIMESTAMP( MAX(post_date) ) AS ts
FROM $wpdb->posts, $wpdb->post2cat FROM $wpdb->posts, $wpdb->post2cat, $wpdb->categories
WHERE post_status = 'publish' AND post_id = ID $exclusions WHERE post_status = 'publish' AND post_id = ID $exclusions
GROUP BY category_id"); GROUP BY category_id");
foreach ($cat_dates as $cat_date) { foreach ($cat_dates as $cat_date) {