View Single Post
Old 05-08-2009, 07:32 PM   #2 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

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']; 
allworknoplay is offline  
Reply With Quote
The Following User Says Thank You to allworknoplay For This Useful Post:
shankar (05-09-2009)