To get the highest number, you can just order by version in descending order:
SELECT title, doc_num ORDER by version DESC
Or is there a particular reason you want to use MAX?
Also, if you just want the one with the latest version, then you can use the LIMIT clause to get only one result:
SELECT title, doc_num ORDER by version DESC LIMIT 1
In reply to Re: MySQL question
by Jazz
in thread MySQL question
by Kozz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |