Re: Quarter question..

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

 



On Monday 04 November 2002 19:58, joakim.andersson@cybercom.se wrote:
> > $sql = "select quarter($qdate)" or die("not work #3");
>
> change to
> $sql = "select quarter($qdate) as my_quarter"; //Added an alias to
> quarter($qdate). Easier to access that way...
> And there's no need for an 'or die()' here. You're just assigning a
> variable and most likely this will allways work!

On the contrary. If you've made a mistake in your query you wouldn't know 
what's happening. So having the below is a very good idea.

> $yyy = mysql_query ($sql) or die("not work #4: " . mysql_error());
> //Standard MySQL trouble-shooting...

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
Ask not what's inside your head, but what your head's inside of.
		-- J.J. Gibson
*/


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux