> On Monday 04 November 2002 19:58, [EMAIL PROTECTED] 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...
I might have been unclear in my reply.
The original code had an 'or die()' on $sql = "select..." aswell and that
is, in my opinion, rather unnecessary.
Using 'or die(mysql_error())' on mysql_query should be mandatory. At least
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php