RE: mysql_fecth_array() and function call as parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux