Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: studiowi33 on August 13, 2011, 01:24:20 PM

Title: mySQL question - How do I query the database?
Post by: studiowi33 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.
Title: Re: mySQL question - How do I query the database?
Post by: ascaland 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