$wpdb->get_var("SELECT 1 FROM ... ") not working
|Reported by:||orvar||Owned by:|
Using queries like
$a = $wpdb->get_var("SELECT 1 FROM ... ")
to confirm the existence of something in a table does not work ($a is not set to 1). wpdb seems to have a problem with the fact that the column has a numerical name in the result as
$a = $wpdb->get_var("SELECT 1 AS x FROM ... ")
works fine ($a == 1).
Change History (5)
- Milestone 2.3 deleted
- Resolution set to wontfix
- Status changed from new to closed
Note: See TracTickets for help on using tickets.