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

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -