Ticket #4826: 4826.diff
File 4826.diff, 697 bytes (added by , 17 years ago) |
---|
-
wp-includes/wp-db.php
307 307 function get_col($query = null , $x = 0) { 308 308 if ( $query ) 309 309 $this->query($query); 310 else311 return null;312 310 313 if ( !$this->last_result ) 314 return null; 315 316 $i = 0; 317 foreach( $this->last_result as $row ) { 318 $arr = array_values( (array) $row ); 319 $new_array[$i] = $arr[0]; 320 $i++; 311 $new_array = array(); 312 // Extract the column values 313 for ( $i=0; $i < count($this->last_result); $i++ ) { 314 $new_array[$i] = $this->get_var(null, $x, $i); 321 315 } 322 316 return $new_array; 323 317 }