Support » Plugins » Can't get wpdb->rows_affected to work right

  • Scott Fennell



    I’m trying to figure out how many rows were deleted. rows_affected keeps returning a value of ‘0’, no matter how many rows are deleted:

    		$delete_coupons = $_POST['delete_coupons'];
    			FROM ".$coupon_table."
    			ORDER BY id
    			LIMIT $delete_coupons
    		if($rows_deleted > 0){
    			echo"You just deleted the $rows_deleted most recently created coupons!";
    			echo"rows_deleted:$rows_deleted <br> There was an error and the coupons could not be deleted.";
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Can't get wpdb->rows_affected to work right’ is closed to new replies.