$query = "CALL ..........";
$result = $wpdb->get_results($query);
print_r($results);
Is returning an empty array and $wpdb->query does not return anything, how do you run stored procedures from the $wpdb class?
$query = "CALL ..........";
$result = $wpdb->get_results($query);
print_r($results);
Is returning an empty array and $wpdb->query does not return anything, how do you run stored procedures from the $wpdb class?
wpdb detects the type of query and returns the result if it starts with select, else the affected rows. Since yours starts by call, it's probably mistaking it for an insert, update, delete, etc. statement.
Try this (might trick wpdb into thinking it's a select statement:
/* select */ call ...;
Or this (not sure the mysql parser will like it):
select * from ( call ... );
If all else fails (and even if not), consider opening a ticket in the wp trac.
I am not sure about procedures, but good start will be to check if there is some reason reported for query failing.
You can turn error echoing on and off with the show_errors and hide_errors, respectively.
<?php $wpdb->show_errors(); ?>
<?php $wpdb->hide_errors(); ?>You can also print the error (if any) generated by the most recent query with print_error.
<?php $wpdb->print_error(); ?>