Dear Eldon,

> record for each device ID without retrieving them all to find the most
> recent name?

SELECT * FROM my_table WHERE ID = LAST_INSERT_ID(ID)

Check: http://www.mysql.com/doc/M/i/Miscellaneous_functions.html

Regards,

--
  Stefan Hinz
  Geschäftsführer / CEO iConnect e-commerce solutions GmbH
  #  www.js-webShop.com www.iConnect.de
  #  Gustav-Meyer-Allee 25, 13355 Berlin
  #  Tel: +49-30-46307-382  Fax: +49-30-46307-388

----- Original Message -----
From: "Eldon Ziegler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 1:24 PM
Subject: SELECT to get last entry


> I have a table that includes a device ID (indexed) and the name of the
> device with multiple records ordered over time. How can I retrieve the
last
> record for each device ID without retrieving them all to find the most
> recent name?
>
> Eldon Ziegler
> ProAtion Systems
> [EMAIL PROTECTED]
> http://www.proation.com
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to