Not standard table prefix
-
There is a problem when wordpress using not standard table prefix – the slug is ignored.
Sql queris had to be:
$sql = sprintf(“SELECT term_id FROM {$wpdb->prefix}terms WHERE slug = ‘%s’ LIMIT 1”, $category_slug);
not
$sql = sprintf(“SELECT term_id FROM wp_terms WHERE slug = ‘%s’ LIMIT 1”, $category_slug);
Please notice there is 2 such queries.
- The topic ‘Not standard table prefix’ is closed to new replies.