I have a form created with gravity forms (wordpress) and taking as input the "card number" and the email I want to see if the data associated with a user. I tried to make me return the number of rows in the query, but num_rows always returns 0. The "card number" is in the table usermeta.It copies the function code created.
function ricerca_fc_from_db($entry, $form) {
global $wpdb;
$wpdb->get_results("SELECT meta_value
FROM $wpdb->usermeta wpusermeta
FULL JOIN $wpdb->users wpusers ON (wpusermeta.user_id = wpusers.ID)
WHERE wpusermeta.meta_value =".$entry[1]."
AND wpusers.user_email ='".$entry[2]."'
AND wpusermeta.user_id = wpusers.ID");
$row = $wpdb->num_rows;
if($row == 0) {
} else {
header("location: http://stackoverflow.com/");
}
}