HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Where on earth are forum posts stored in the DB

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#102791 (In Topic #20138)
Avatar

Fan in action

Greetings,

I'm doing some DB maintenance and I was looking for the table and column where the forum posts are stored  but I can't find them. I've found where the topics are stored but not the posts.

I did find some posts in the "h_before" column in the "ocp_f_post_history" table but apparently those are just revisions of edited posts. Apparently, posts that were not edited will not show up there.

So where are the posts stored in the mySQL DB? O_o
Back to the top
 
Posted
Rating:
#102795
Avatar

Fan in training

off hand, I believe I read somewhere that they are stored in the translation table. I've never checked it before.
Back to the top
 
Posted
Rating:
#104775
Avatar

Fan in action

*bump*


Hi,


So I'm doing some more work on my forum and I would really like to know what table that is or where to find the actual forum posts in the DB. I'm modifying some aspects of my forum based on user feedback and I can't move forward because I can't find where the forum posts are stored.

Can someone please shed a light here?

Many thanks! :)
Back to the top
 
Posted
Rating:
#104778
Avatar

ocp_translate. All human-language strings go through this table in order for ocPortal's content-translation system to work.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#104795
Avatar

Fan in action

That's exactly it! Thank you so much!

One last question that arose from that though.

How exactly does date and time of posts and topics work?

Looking at the columns in the DB, those values are not your standard datetime or timestamp yet on the forum they show date, day and time normally.

What's the trick here? Are those values calculated somewhere before being displayed on the page or is that info also stored elsewhere in the DB?
Back to the top
 
Posted
Rating:
#104808
Avatar

Community saint

Dates/times are stored in standard unix epoch time format, i.e. the number of seconds elapsed since midnight January 1, 1970.

The only trick is that the GMT/UTC time in the database is time-zone adjusted before it is converted to "standard datetime or timestamp" for display.

Check out Epoch Converter - Unix Timestamp Converter for an explanation and online converter.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: