>I don't have your code, so I don't know. ;) >Try to run the sql-statement by hand with phpmyadmin. Are you getting >correct result?
LOL, good idea... I just tried it with phpMyAdmin and it's still selecting the second to last record, not THE last! Here's the SQL query again: SELECT equipment.type AS type, equipment.menu AS menu, pireps.id AS id, pireps.departure_airport AS dep, pireps.arrival_airport AS arr, pireps.aircraft AS aircraft, pireps.month AS month, pireps.day AS day, pireps.year AS year FROM pireps LEFT JOIN equipment ON pireps.aircraft = equipment.type WHERE pireps.pilot_id=100 AND pireps.aircraft IS NOT NULL GROUP BY equipment.type ORDER BY pireps.id DESC LIMIT 1 That query pulls up the second to last record with a record id of 15357, but the actual last record is record id 15379, which is the next record for this particular "pilot_id" and should be the one displayed with the limit 1 clause. thanks, Lance Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h0che9p/M=362329.6886308.7839368.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123790066/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992 ">Fair play? Video games influencing politics. Click and talk back!</a>.</font> --------------------------------------------------------------------~-> Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
