MySql Help

They have: 850 posts

Joined: Jul 1999

Hello (once again),
I need to grab the Date from the LAST row that has the subject='$row[1]'.
Any ideas? I have tried many attempts to figure out the correct code, but can't seem to get it.

Any help would be appretiated.
Thanks

------------------
Fact:Showing facts in your signature is unoriginal Wink
Personal Site
http://www.wiredstart.com : The Technology Start Page

They have: 32 posts

Joined: Mar 2000

How about selkect MAX(date) from table where subject = $row[1]?

Am I misunderstanding the question? Remember, SQL doesn't understand the concept of "last row" -- so unless you have some kind of counter on the table, or a sequentially ascending date, this isn't something you can do. You really need to define "last" other than by the last row inserted (if there is no timestamp on each row).

Ralph

------------------
http://www.hockeydb.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.