Title: simple tagging &#8211; database problem
Last modified: August 18, 2016

---

# simple tagging – database problem

 *  [davors](https://wordpress.org/support/users/davors/)
 * (@davors)
 * [19 years ago](https://wordpress.org/support/topic/simple-tagging-database-problem/)
 * I’m new to wordpress and I installed WP 2.2. Pluggin Simple Tagging does not 
   work and it outputs in the sidebar:
 * WordPress database error: [Not unique table/alias: ‘stptags’]
    SELECT SQL_CALC_FOUND_ROWS
   wp_posts.* FROM wp_posts LEFT JOIN wp_stp_tags AS stptags ON (wp_posts.ID = stptags.
   post_id) LEFT JOIN wp_stp_tags AS stptags ON (wp_posts.ID = stptags.post_id) 
   WHERE 1=1 AND (post_type = ‘post’ AND (post_status IN(‘static’, ‘publish’) OR
   post_status = ‘private’)) AND stptags.tag_name IN (‘software’) AND stptags.tag_name
   IN (‘software’) GROUP BY wp_posts.ID HAVING COUNT(ID) = 1 ORDER BY post_date 
   DESC LIMIT 0, 5
 * and so on…
 * Does anyone have a clue on how to fix this.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [davidbibo](https://wordpress.org/support/users/davidbibo/)
 * (@davidbibo)
 * [19 years ago](https://wordpress.org/support/topic/simple-tagging-database-problem/#post-568441)
 * Greetings,
 * Using WP 2.2.
 * I have also posted this support question on the simpletagging [support site](http://trac.herewithme.fr/project/simpletagging/ticket/24).
 * Whenever users click on tags at the bottom of our posts, they’re successfully
   taken to a page with all of the posts for that tag but in the sidebar appears
   an error:
 * > ‘WordPress database error: [Not unique table/alias: ‘stptags’] SELECT SQL_CALC_FOUND_ROWS
   > wp_posts.* FROM wp_posts LEFT JOIN wp_stp_tags AS stptags ON (wp_posts.ID =
   > stptags.post_id) LEFT JOIN wp_stp_tags AS stptags ON (wp_posts.ID = stptags.
   > post_id) WHERE 1=1 AND (post_type IN(‘page’, ‘post’) AND (post_status IN(‘static’,‘
   > publish’) OR post_status = ‘private’)) AND stptags.tag_name IN (‘Giuliani’)
   > AND stptags.tag_name IN (‘Giuliani’) GROUP BY wp_posts.ID HAVING COUNT(ID) 
   > = 1 ORDER BY post_date DESC LIMIT 0, 10′
 * Example: [http://roguelystated.com/tag/Giuliani](http://roguelystated.com/tag/Giuliani)
 * Thanks for any help you can provide,
    David
 * [davidbibo@roguelystated.com](https://wordpress.org/support/topic/simple-tagging-database-problem/davidbibo@roguelystated.com?output_format=md)
 *  [davidbibo](https://wordpress.org/support/users/davidbibo/)
 * (@davidbibo)
 * [19 years ago](https://wordpress.org/support/topic/simple-tagging-database-problem/#post-568456)
 * Please note the fix referenced [here](http://trac.herewithme.fr/project/simpletagging/ticket/24#comment:4)
   worked for me. Good luck to others struggling with this.
 * In case you have trouble with the embedded scrolling window on that page, here’s
   the fix:
 * Line 675:
    $join .= ” LEFT JOIN {$this->info[‘stptable’]} AS stptags ON ({$wpdb-
   >posts}.ID = stptags.post_id) “;
 * change by adding the following line, preceding the $join line:
    if(!ereg(‘stptags’,
   $join))
 * so you end up with:
    if(!ereg(‘stptags’,$join)) $join .= ” LEFT JOIN {$this->
   info[‘stptable’]} AS stptags ON ({$wpdb->posts}.ID = stptags.post_id) “;
 * Cheers,
    [davidbibo@roguelystated.com](https://wordpress.org/support/topic/simple-tagging-database-problem/davidbibo@roguelystated.com?output_format=md)
 *  [gspark](https://wordpress.org/support/users/gspark/)
 * (@gspark)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/simple-tagging-database-problem/#post-568487)
 * upon deactivating the plugin, it doesn’t delete the items it creates in the database
   and when i deleted those items then tried to activate it again it results in 
   an error,
 * wish these plugins would clean up after themsevels when deactivating :))

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘simple tagging – database problem’ is closed to new replies.

## Tags

 * [problem](https://wordpress.org/support/topic-tag/problem/)
 * [simple](https://wordpress.org/support/topic-tag/simple/)
 * [tagging](https://wordpress.org/support/topic-tag/tagging/)

 * 3 replies
 * 3 participants
 * Last reply from: [gspark](https://wordpress.org/support/users/gspark/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/simple-tagging-database-problem/#post-568487)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
