Support » Alpha/Beta/RC » My code doesn’t work with 2.3

  • FionaGilbert


    Hi all,

    I am using the code below to display my categories but with 2.3 it appears not to work.

    Has table names been changed in 2.3 and if so why?

    Can anyone possibly help with this?

    	/* Comma-delimited category list */
    	global $wpdb;
    	$thecats = $wpdb->get_results("SELECT * FROM $wpdb->categories WHERE category_count > 0 ORDER BY cat_name ASC");
    	$eor = count($thecats) - 1;
    	foreach($thecats as $thecat) :
    	<a>cat_ID); ?>" title="<?php echo wp_specialchars($thecat->category_description); ?>"><?php echo $thecat->cat_name; ?></a><?php if($thecats[$eor] != $thecat) echo ', '; ?>
    	<?php endforeach; ?>


Viewing 4 replies - 1 through 4 (of 4 total)
  • savvy1405


    Yeah I’m having same problem, missing table wp_post2cat

    Hi there,

    Is there anyone who can help with this?

    Thank you

    Hello there,
    I have upgraded WP from 2.2.1 to 2.3 RC1 just now and I am getting this database error:
    WordPress database error: [Table ‘d0031cb3.wp_post2cat’ doesn’t exist]
    SELECT * FROM wp_posts ,wp_post2cat WHERE post_status = ‘publish’ AND post_type = ‘post’ AND post_date_gmt <= ‘2007-08-01 14:43:25’ AND ( ID = ‘169’ )AND post_date_gmt <= DATE_SUB(‘2007-09-20 03:35:43’, INTERVAL 30 DAY) AND post_ID = ID AND (category_ID = ‘1’ OR category_ID = ’19’ ) ORDER BY rand() LIMIT 1
    I have only found this error on top of the cute puppies page and on my archive page. otherwise everything seems to be working properly. So, any idea of what I can do to get rid of that error?

    I’m currently setting up a review funny cat site based on WordPress where the users submit reviews of products. I would like to add some custom fields to the comment form that would then display in the user’s comment.

    Update: I found a plugin called CForms that looks like it supports this feature.

    Does anyone have more experience using this plugin for comments?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘My code doesn’t work with 2.3’ is closed to new replies.