Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: MySQL Query

by Elgon (Curate)
on Nov 22, 2001 at 18:56 UTC ( #126973=note: print w/ replies, xml ) Need Help??


in reply to MySQL Query

Anonymous monk,

I was doing this very thing yesterday for my final year project for my chemistry degree(A web-enabled chemical database of compounds which does all sorts of pretty things - alas in PHP not Perl but you can't have everything.)

select STUFF from TABLE order by INDEX/DATE desc limit 5;

Just replace STUFF with the column names you want, TABLE with the table name and INDEX/DATE with whatever you want to index it by (the desc tells it to do it in reverse order, sorting so that older dates end up last and newer ones first.)

"A nerd is someone who knows the difference between a compiled and an interpreted language, whereas a geek is a person who can explain it cogently over a couple of beers" - Elgon


Comment on Re: MySQL Query
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2014-12-26 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls