Jump to content

Concatenating Integers with MySQL, or "get last 10 entr


Genesis

Recommended Posts

Hi there,

 

For my website I have a news system that will have thousands of entries. What I would like to do is retrieve the 10 most recent entries.

 

Is there a \"get X most recent entries based on index\" function? I do NOT know how to use indexes, or autoincrements or anything like that. I have tried and tried to understand them, but no tutorial I\'ve seen yet has explained them in such a way that I can understand.

 

Or, back to my first question: is there a way to concatenate two integers? I do NOT want them added.. just appending one onto the other, like a string. (I know about the concat() function, but I dunno if it works with integers..)

 

The reason I need to do this is because if I cannot figure out indexes, I will have to concatenate the date with the time and use that as one big number to determine which 10 posts were made most recently.

 

Any help is greatly appreciated :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.