Wpdb not return result, query is qorking, no error
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?????
- The topic ‘Wpdb not return result, query is qorking, no error’ is closed to new replies.