• [Title de-HELPED; please do not shout at us]

    I need help, please!

    I installed EXEC-php to be able to put PHP codes in my pages to be able to put a query but here’s the problem :

    <?php
    global $wpdb;
    $sql = $wpdb->get_results("SELECT field1, fields2 FROM prefix_table", OBJECT);
    ?>

    This query works but as soon as I put a “WHERE” clause, I get an error 406.

    Where can be the issue? When I use the same query in phpMyAdmin, it works fine.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    – Have you discussed this error with your hosting provider?

    – Also, please check the error logs on your server for a more specific error message and see why it’s failing. If you need help locating them, ask your hosting provider to help you with that.

    Thread Starter erestorpat

    (@erestorpat)

    So this is related to my hosting provider, I’ll see with them in that case.

    I know it was working partially when I put the query in functions.php and that I call the function but it wouldn’t show the informations properly.

    Thanks Tara, I’ll see what I can do. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error 406 on MySQL Query’ is closed to new replies.