05-08-2009, 07:32 PM
|
#2 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
You can't do it that way, you are trying to output the resource with that approach. You have to do it like this:
Current:
PHP Code:
$set_month = mysql_query("SELECT MONTHNAME('".$thing."') FROM stud_attendance");
$set_month_value = mysql_query("SELECT MONTH('".$thing."') FROM stud_attendance");
New:
PHP Code:
$set_month = mysql_query("SELECT MONTHNAME('".$thing."') FROM stud_attendance");
$month_name_rows = mysql_fetch_assoc($set_month);
$month_name = $month_name_rows['MONTHNAME'];
$set_month_value = mysql_query("SELECT MONTH('".$thing."') FROM stud_attendance");
$month_value_rows = mysql_fetch_assoc($set_month_value);
$month_value = $month_value_rows['MONTH'];
|
|
|
|