wordpress - strip out array from wpdb get_col query results? -
how can function return value, rather array?
$results = $newdb->get_col( "select itemid, price $table itemid = $quanid group price order count(*) desc limit 1", 1 );
this result when print_r( $result );
:
array ( [0] => 40 )
this need:
40
try
$wpdb->get_var()
if have more results one, you'll first one.
Comments
Post a Comment