RE: [PHP] mysql_fecth_array() and function call as parameter

From: Date: Tue, 28 Mar 2006 00:27:07 +0000
Subject: RE: [PHP] mysql_fecth_array() and function call as parameter
Groups: php.general 
Request: Send a blank email to php-general+get-232685@lists.php.net to get a copy of this message
> -----Original Message----- > I finally got the function to work. However I have a problem with > another function. It is almost exactly like the origional function > but in this function I am determining the days instead of the month. > I made the same changes to the days function as I did to the month > function. However no value is being set to be returned. I can't find > my error. My function is below: <snip> > switch ($query1_data["months"]) > { > case "January": > case "March": > case "May": > case "July": > case "August": > case "October": > case "December": Once again, in your switch statement you are checking for the full name of the month, but your query will be returning the month number. Since you don't have a default case on your switch statement, $return is never being set, so " $day = $this->determineDay(); " is not setting $month to anything, which is why you are getting error messages. http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html Brady

« previous php.general (#232685) next »