Jump to content

Concatenating Integers with MySQL, or "get last 10 entr


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 :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.