Title: conditional dropdown values error
Last modified: November 25, 2019

---

# conditional dropdown values error

 *  [youtag](https://wordpress.org/support/users/youtag/)
 * (@youtag)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/conditional-dropdown-values-error/)
 * The conditional fields doesn’t work for me (keeps spinning). After some debugging
   I found that the ajax function throws the following error :
 * <div id=”error”><p class=”wpdberror”>**Erreur de la base de données WordPress:**[
   You have an error in your SQL syntax; check the manual that corresponds to your
   MariaDB server version for the right syntax to use near '-type_term_relationship
   ON (ff_posts.ID = produit-type_term_relationship.object_' at line 6]<br />`
    
   SELECT COUNT( DISTINCT ff_posts.ID ) as term_count, terms.term_id as term_id,
   terms.name as term_name, terms.slug as term_slug, term_taxonomy.taxonomy as taxonomy
   FROM ff_posts INNER JOIN ff_term_relationships AS term_relationships ON ff_posts.
   ID = term_relationships.object_id INNER JOIN ff_term_taxonomy AS term_taxonomy
   USING( term_taxonomy_id ) INNER JOIN ff_terms AS terms USING( term_id ) LEFT 
   JOIN ff_term_relationships as produit-type_term_relationship ON (ff_posts.ID 
   = produit-type_term_relationship.object_id) LEFT JOIN ff_term_relationships as
   produit-marque_term_relationship ON (ff_posts.ID = produit-marque_term_relationship.
   object_id) WHERE ff_posts.post_type = 'produit' AND ff_posts.post_status = 'publish'
   AND ( produit-type_term_relationship.term_taxonomy_id IN (81) ) AND ( produit-
   marque_term_relationship.term_taxonomy_id IN (80) ) AND terms.term_id IN (99,61,80,81,62,100,86,63,64,97,90,89,98,69,77,79,87,85,84,67,82,91,102,94,93,96,104,101,83,65,105,74,95,103,68,92)
   GROUP BY terms.term_id HAVING term_count > 0 ORDER BY term_count DESC LIMIT 1000
   </p></div>
 * Any ideas ?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-dropdown-values-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Jonathandejong](https://wordpress.org/support/users/jonathandejong/)
 * (@jonathandejong)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/conditional-dropdown-values-error/#post-12480956)
 * Hi [@youtag](https://wordpress.org/support/users/youtag/) sorry for the long 
   wait.
 * Did you resolve this?
    could it be an issue with `-` in the naming of the term_relationship
   table..
 *  Thread Starter [youtag](https://wordpress.org/support/users/youtag/)
 * (@youtag)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/conditional-dropdown-values-error/#post-12481396)
 * hello [@jonathandejong](https://wordpress.org/support/users/jonathandejong/),
   I think I went without that functionality in the end but the site is not yet 
   public for other reasons.
 * Thanks for your suggestion, it is very plausible. Just read that sql table names
   using a dash character need to be escaped with back ticks. I will try the fix
   and come back to you. Really love your plugin.

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

The topic ‘conditional dropdown values error’ is closed to new replies.

 * ![](https://ps.w.org/beautiful-taxonomy-filters/assets/icon-256x256.png?rev=1654967)
 * [Beautiful taxonomy filters](https://wordpress.org/plugins/beautiful-taxonomy-filters/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/beautiful-taxonomy-filters/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/)
 * [Active Topics](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/beautiful-taxonomy-filters/reviews/)

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [MariaDB](https://wordpress.org/support/topic-tag/mariadb/)

 * 2 replies
 * 2 participants
 * Last reply from: [youtag](https://wordpress.org/support/users/youtag/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/conditional-dropdown-values-error/#post-12481396)
 * Status: not resolved