Re: [PHP-DB] Quarter question..

2002-11-04 Thread Jason Wong
On Monday 04 November 2002 22:56, [EMAIL PROTECTED] wrote: > I might have been unclear in my reply. Sorry, I was following this thread on and off and probably misinterpreted your post. > The original code had an 'or die()' on $sql = "select..." aswell and that > is, in my opinion, rather unnece

RE: [PHP-DB] Quarter question..

2002-11-04 Thread joakim . andersson
> 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

Re: [PHP-DB] Quarter question..

2002-11-04 Thread Jason Wong
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: [PHP-DB] Quarter question..

2002-11-04 Thread joakim . andersson
> > printf("Delete", > > $PHP_SELF, > > $myrow["id"]); > > printf(" > href=\"%s?id=%s&submit=yes\">Update%s > > %s %s", > > "update-inv.php", $myrow["id"], $myrow["name"], > > $myrow["details"], $yyy); My bad. Before this printf statement you need $my_var = mysql_fetch_array($yyy); and

RE: [PHP-DB] Quarter question..

2002-11-04 Thread joakim . andersson
> $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!

[PHP-DB] Quarter question..

2002-11-01 Thread James Hatridge
HI all, In the code below I'm trying to get the last column to show 1, 2, 3, or 4 according to which quarter of the year it is. But all it shows in that column is " Resource ID # X". The X starts with #3 and goes to 18. There are (at the moment) 15 items in the table. Any ideas what's wrong?