Retrieving Data From Single Cell In Wordpress MySQL Table
Their table has six columns named blog_ID, level, expire, gateway, term and amount.
I am interested in using the first three ... blog_ID, level and expire. blog_ID and level are numeric values. expire is a unix (or linux) epoch date/timestamp.
I am struggling to display the level associated with a particular blog_ID. Later, I hope to evaluate whether the expire field is greater than the current epoch date/timestamp or not.
In the code below, all goes fine until I try to display the value. My result is showing as 'ARRAY.'
<?PHP
// Testing by Kirk
global $blog_id;
global $wpdb;
$thisblog = $blog_id;
echo ('Blog #' . $thisblog);
?>.' is at Level #'. <?php
$res = $wpdb->get_results("SELECT level FROM wp_pro_sites WHERE blog_ID = '$thisblog'");
echo $res;
?>
<br /> Thanks in advance!
The 2nd Amendment, 1789 - The Original Homeland Security.
Gun control means never having to say, "I missed you."