wpdb get_var not working
-
Hi,
I am updating my customer table, which updates the table so my count should return null
But with or without the flush command the get_var, returns a 1
Please see code below –
$wpdb->update(‘tbl_Battle’, array( ‘Battle_Dead’ => 1, ‘Battle_Front’ => $varfrontno ), array(‘Battle_Number’ => $varbattno, ‘Battle_Army’ => $varbattarmy ));
$wpdb->flush();
$Getfrontno = $wpdb->get_var(“SELECT count(Battle_ID) FROM tbl_Battle WHERE Battle_Front = 0 AND Battle_Number = 3”);————
If I run the count command in mysql then it returns null
Is there a reason why my get_var retrieves a value which is not correct ?
I hope one has a great idea
Thanks
Best Regards
Torben
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wpdb get_var not working’ is closed to new replies.