Like posts via MySQL

Is this possible because I noticed the like_users field is a blob in the database? I need a programmatic (PHP) way of adding a like to a post given 1 argument, which is the user_id.
 
Use XenForo_Model_Like::likeContent('post', $postId, $userLikingPost['user_id']);
Like records are inserted into xf_liked_content. The like_users field is cached data that is built from xf_liked_content.

I uploaded a script to this thread to rebuild that information if you want:

http://xenforo.com/community/threads/is-there-a-way-to-rebuild-post-profile-post-like-caches.42384/
Thanks for the quick responses, that's pretty much what I wanted (a bit easier than I thought it would be too XD)
 
Back
Top Bottom