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
> 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
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'
> > 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
> $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!
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?