Skip to main content
10 events
when toggle format what by license comment
Dec 2, 2019 at 16:45 history edited Aurovrata CC BY-SA 4.0
improve format
Sep 6, 2018 at 7:30 comment added Aurovrata as for the 2nd method this is more tricky to debug as it is possible that the conditional statements are not being passed, it all depends on where you are running the query. If I get a moment, I will test the 2nd method on my local machine and come back here to correct it. For now let's see if u can get your problem fixed with the 1st method as that's easier to debug
Sep 6, 2018 at 7:26 comment added Aurovrata Dear @Mike, apologies I realised there was a typo in my SQL query which I have now fixed in the 1st method. I have also added a debug line for you to validate the initial term ids returned. Can you have another go with the first method and see if you get any results.
Sep 6, 2018 at 7:24 history edited Aurovrata CC BY-SA 4.0
fixed sql errors
Sep 6, 2018 at 1:01 comment added Mike I also tested the second method. ; << causes an error in this part. AND {$wpdb->terms}.slug LIKE '%{$_POST['input_search_txt'];}%' I removed it, but I did not get the results I wanted.
Sep 6, 2018 at 0:57 comment added Mike Thank you for your answer. Unfortunately, the first method causes an error. WordPress database error: [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 '}.term_id = wp_term_taxonomy.term_id AND wp_term_taxonomy.taxonomy LIKE 'pa' at line 3] SELECT term_id FROM wp_terms WHERE (wp_terms}.term_id = wp_term_taxonomy.term_id AND wp_term_taxonomy.taxonomy LIKE 'pa_reference-p-no' AND wp_terms.slug LIKE '%3996%'
Sep 5, 2018 at 10:50 history edited Aurovrata CC BY-SA 4.0
last edit delted some code
Sep 5, 2018 at 10:41 history edited CodeMascot CC BY-SA 4.0
Indentation fixed.
Sep 5, 2018 at 10:41 history edited Aurovrata CC BY-SA 4.0
format of code
Sep 5, 2018 at 10:34 history answered Aurovrata CC BY-SA 4.0