When I try to use this SELECT MAX(column) AS amount FROM table; with
PHP, the result I get is always: "Resource id #2" and not the number I
expect... but if I run this at the mysql command line, it shows the
expected number/value. What is that?
IS / MCSE+I
> -----Mensaje original-----
> De: Leon Mergen [mailto:[EMAIL PROTECTED]]
> Enviado el: Miércoles, 12 de Junio de 2002 05:13 p.m.
> Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Asunto: [PHP-DB] Re: Querying for MAX
> select max(id) as amount from table
> "César aracena" <[EMAIL PROTECTED]> wrote in message
> I'm sorry if this mensaje is posted twice. I sent it yesterdays, but
> then my ISP had problems with e-mail and I lost dozens of them and
> know if sent OK.
> Hi all,
> 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
> that the last member added was 10 so I can add member 11 without using
> auto_increment, because I need to insert old members too which already
> have ID numbers. Is that possible?
> Thanks in advance,
> Cesar Aracena <mailto:[EMAIL PROTECTED]>
> CE / MCSE+I
> Neuquen, Argentina
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php