Re: Quarter question..

From: Date: Mon, 04 Nov 2002 12:34:04 +0000
Subject: Re: Quarter question..
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-22965@lists.php.net to get a copy of this message
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 */

« previous php.db (#22965) next »