Advertisement:

Author Topic: mySQL question - How do I query the database?  (Read 1042 times)

Offline studiowi33

  • Jr. Member
  • **
  • Posts: 221
mySQL question - How do I query the database?
« on: August 13, 2011, 01:24:20 PM »
Hi all--

I need to start to querying the database by date values. As date values seem to be...missing (in some areas,) I need to ask for some guidance. What i need to start to do soon is search member posts and sort them by date. I need to know who posted what (and if the posted) and when that post was made. I need to do this on a monthly basis, but I can find any date values in the smf_messages table. I can find a bizarre time value, but no date field. (I'm physically & mentally exhaused at the moment, so that may have something to do with my inabiltiy to find what I'm looking for.)

There are other queries that I'm going to need to make in regards to this same procedure, but I need to take it one step at a time.

If anyone can shed some light, I'd be much appreciative, as per usual.
Thank you Smiffers.

-s.w

P.S. 2.0 final.
« Last Edit: August 13, 2011, 01:27:49 PM by studiowi33 »
SMF 2.0.2

Offline Anthony`

  • Sophist Member
  • *****
  • Posts: 1,347
  • Gender: Male
  • Formerly Project Evolution
    • AnthonyCalandra on GitHub
Re: mySQL question - How do I query the database?
« Reply #1 on: August 13, 2011, 05:05:25 PM »
poster_time is actually what you are looking for. Its basically just a timestamp generated which contains the full date of the post. You can generate timestamps using PHP's time function, and convert them to proper formatting of your forum's date settings using,
http://support.simplemachines.org/function_db/index.php?action=view_function;id=215