RE: [PHP] Querying for MAX <-- solved

2002-06-12 Thread César Aracena
> You really need to re-think your database design if you have to do it > this way. > > ---John Holmes... > > > -Original Message- > > From: César Aracena [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, June 12, 2002 2:51 PM > > To: 'PHP DB List&#

RE: [PHP] Querying for MAX

2002-06-12 Thread John Holmes
Holmes... > -Original Message- > From: César Aracena [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 12, 2002 2:51 PM > To: 'PHP DB List'; 'PHP General List' > Subject: RE: [PHP] Querying for MAX > > Thanks Natalie & Ed. This Works just fine. >

RE: [PHP] Querying for MAX

2002-06-12 Thread Martin Towell
what's you're after is select max(id) from table -Original Message- From: David Freeman [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 9:36 AM To: 'PHP General List' Subject: RE: [PHP] Querying for MAX > What I'm trying to do here is not insi

RE: [PHP] Querying for MAX

2002-06-12 Thread David Freeman
> What I’m trying to do here is not inside PHP nor MySQL books > I have. I need to query the DB to look the max result in a > column. That is, if I have affiliate members with ID going > from 1 to 10, get the query to know that the last member > added was 10 so I can add member 11 witho

RE: [PHP] Querying for MAX

2002-06-12 Thread César Aracena
688 (0299) 446-6621 > -Mensaje original- > De: Leotta, Natalie (NCI/IMS) [mailto:[EMAIL PROTECTED]] > Enviado el: Miércoles, 12 de Junio de 2002 03:39 p.m. > Para: 'César Aracena'; 'PHP DB List'; PHP General List > Asunto: RE: [PHP] Querying for MAX > >

RE: [PHP] Querying for MAX

2002-06-12 Thread Leotta, Natalie (NCI/IMS)
is select MAX() what you are looking for? I know it works on numeric columns, I'm not sure if it works on non-numbers, you'd have to look it up in a SQL Tutorial somewhere. Good luck! -Natalie -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12

RE: [PHP] Querying for MAX

2002-06-12 Thread Lazor, Ed
select MAX(fieldname) from table; You can also insert data in tables with auto_increment fields to account for yourneed to insert old member ids. insert into tablename (ID, Name) values ('$OldID', '$Name'); -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Wednes