Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

MySQL question

by Kozz (Friar)
on Mar 28, 2002 at 21:35 UTC ( #155114=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    id | title | doc_num | version
    ---+-------+---------+--------
     1 |  bar  |  1234   |   1
     2 |  foo  |  1234   |   2
     3 |  baz  |  5678   |   1
    
  2. or download this
    SELECT title, doc_num, MAX(version) AS version ORDER BY title;
    which produces this:
    ...
    -------+---------+--------
      bar  |  1234   |   2
      baz  |  5678   |   1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://155114]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2015-07-06 02:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (69 votes), past polls