Okay, I tried that as just a query and it does work -- it pulls out the highest article number per author. I also need to pull it out according to department, though (sorry, forgot this) and I tried combining the two statements:
SELECT max(ar_id), Articles.ar_author, Articles.ar_title, Articles.ar_short, Departments.d_id
FROM Articles, Authors, Departments
WHERE Authors.a_id = Articles.ar_author
AND Articles.ar_dept = 1
AND Departments.d_id = 1
GROUP BY Articles.ar_author
The problem now is that when I do the query, it DOES return the highest ar_id but for some reason the info about the article is being pulled from a completely different article. As in, the max(ar_id) shows up at 14 but the info it displays about the article is from article 2.
Also, I can't figure out how to put max(ar_id) as a variable that I can call later...
My brain hurts. 🙁
there has to be a less complicated way than this?