I’m totally confused.
I run 2 the same queries, one with $wpdb, the other via mysql_query (also checked via phpmyadmin)
First query returns ONLY ONE row:
$wpdb->get_results("SELECT * FROM wp_terms WHERE slug LIKE '%info%' ORDER BY name ASC");
mysl_query returns 42 rows. The same result if run the query via phpmyadmin.
$con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);
mysql_selectdb(DB_NAME,$con);
$res=mysql_query("SELECT * FROM wp_terms WHERE slug LIKE '%info%' ORDER BY name ASC",$con);
while($obj=mysql_fetch_object($res)) {
var_dump($obj);
}
How can it be ??
$wpdb->show_errors();
$wpdb->print_error();
show no errors.
Try:
Do you have plugins that might interfere with the database?