Wpdb not return result, query is qorking, no error (4 posts)

  1. HateWP666
    Posted 2 years ago #

    I have a weird error using $wpdb, when I tight up my query, to filter the data more, wpdb simply return empty. All tables are inside WP's database, and all have the sufficient rights to query them, since querying them one by one, its always working without any problem.

    But when I run a query, which isn't complex, contains only seven inner joins, I simply got back an empty result.
    global $wpdb is defined, I use $wpdb->show_errors(); $wpdb->print_error(); also print_r($wpdb) not show any error. The environment is a multisite environment, so I even tried to use define( 'DIEONDBERROR', true );
    But still, $res = $wpdb->get_results($wpdb->prepare("[query_strign]", $parameter)); will return nothing. if I use wpdb->last_query, the query works perfectly. If I ease up a few join, to get wider result it will return the correct rows.

    So, simply: WHAT THE $$$$ IS THIS?????

  2. keesiemeijer
    Posted 2 years ago #

    No results matched your query. What is it you're querying for?

  3. HateWP666
    Posted 2 years ago #

    When I run the query outside the WP its working perfectly, I querying user defined tables, but according the codex it should work, and work as well if I not tighten up the query

  4. HateWP666
    Posted 2 years ago #

    Okay, I think I solve the question, our admin configured something really differently, since with an another fresh installation its working.

Topic Closed

This topic has been closed to new replies.

About this Topic