Date: 11/24/00
- Next message: R.B. Scholtus: "Re: AW: [phplib] the "Group by" Function Problem"
- Previous message: rquinn <email protected>: "AW: [phplib] the "Group by" Function Problem"
- In reply to: rquinn <email protected>: "AW: [phplib] the "Group by" Function Problem"
- Next in thread: R.B. Scholtus: "Re: AW: [phplib] the "Group by" Function Problem"
- Reply: R.B. Scholtus: "Re: AW: [phplib] the "Group by" Function Problem"
- Reply: Jesse Swensen: "Re: AW: [phplib] the "Group by" Function Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sorry Dudes,
but I have tried the two shown statements :
"SELECT MAX(demo_ID) MAXDEMOID FROM Match_demo"
"SELECT MAX(demo_ID) AS MAXDEMOID FROM Match_demo"
but $db->f("MAXDEMOID") gives nothing back .... grrrrr
I will show you my code so you maybe see another stupid mistake !?!?!
$query = "SELECT MAX(demo_ID) MAXDEMOID FROM Match_demo";
if($db->query($query)){
$max_rec_id = $db->f("MAXDEMOID");
my_error("MAXDEMOID : ", $max_rec_id);
}
else{
if($debug_db)
my_error($methodname, "Query : $query");
}
RESULT :) -----> Error: MAXDEMOID : :
Am I blind ???
__________________________________________________________________________
At 17:29 24.11.00 +0100, rquinn <email protected> wrote:
>If I may (as a newcomer to this list) respond:
>
>I use a slightly modified select statement, in the form of:
>
>SELECT MAX(demo_id) AS MAXDEMOID FROM Match_demo;
>echo $db->f("MAXDEMOID");
>
>The Alias does the trick.
>
>- Rich
>
>---------------------
>Richard Quinn www.richardquinn.de
>rquinn <email protected>
>
>0173 - 664 1468
>24h: Voicebox:0180/505254647774 Fax:0180/505254647774
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Michael Zeidler [mailto:web_style <email protected>]
> > Gesendet: Freitag, 24. November 2000 17:01
> > An: phplib <email protected>
> > Betreff: [phplib] the "Group by" Function Problem
> >
> >
> > Hi my friends,
> >
> > this problem is rather a MySQL Statement problem than a phplib problem.
> > But I want to use the $db->f() function :))).
> >
> > When I want to get the highest value of a column of a table the following
> > statement would return the right output on the mysql-client.
> >
> > SELECT MAX(demo_id) FROM Match_demo;
> >
> > But how can I get a useable result returned as a row that I can get the
> > highest value of
> > column by using the $db->f("demo_id") function ???
> >
> > The statement above doesnt return a row, so the f()-functione
> > wouldn´t fit
> > here !
> >
> > Thank you for help !
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> > For additional commands, e-mail: phplib-help <email protected>
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: phplib-unsubscribe <email protected>
>For additional commands, e-mail: phplib-help <email protected>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: R.B. Scholtus: "Re: AW: [phplib] the "Group by" Function Problem"
- Previous message: rquinn <email protected>: "AW: [phplib] the "Group by" Function Problem"
- In reply to: rquinn <email protected>: "AW: [phplib] the "Group by" Function Problem"
- Next in thread: R.B. Scholtus: "Re: AW: [phplib] the "Group by" Function Problem"
- Reply: R.B. Scholtus: "Re: AW: [phplib] the "Group by" Function Problem"
- Reply: Jesse Swensen: "Re: AW: [phplib] the "Group by" Function Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

