Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 971571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:59:08+00:00 2026-05-16T02:59:08+00:00

I wrote an application, its not a social networking script by any means, but

  • 0

I wrote an application, its not a social networking script by any means, but my script does have “user profiles” for it and I’m interested in a SQL/PHP design idea to go about activity streams as seen on Facebook for the users of my script.

Activities such as “Joey commented on X’s wall.” or “Joey, X, Foo like your photo” or “Foo changed his picture [picture here]”

I want it to be dynamic, not static entries, because if Joey changes his name to something else, I don’t want it to show old data.

So, if you would please, help me out with a way to design this… I don’t need any code just a push in the right direction.

Thanks alot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:59:08+00:00Added an answer on May 16, 2026 at 2:59 am

    I’m not sure in the long term that your proposed schema will give you much flexibility:

    DB schema is what I am looking for. I was thinking maybe something like…. activity_id activity_message activity_time Where message will be something like “{USERID:34} likes {USERID:23} post” and “{USERID:34} changed his picture {PHOTOID:2}”

    The problem with this is you’re then relying on regular expressions and other expensive (in time) methods of parsing this for display.

    Perhaps (I’ve never had to practically design this sort of thing) if you have a separate table for “likes” which has user.id, post.id, timestamp, you can then for a particular post easily count the number of people who like it, for an activity stream you can filter by user and order by time. The stored user.id is the person who liked the post and you can then do a join on the post.id to get the user associated with that post.

    For dealing with pictures and/or other interactions you could have a table containing, user.id, item.id, action, timestamp, where item.id is a picture/post/other id reference and the action is a numeric identifier corresponding to the action which you can then associate with a string.

    By doing things this way you have other advantages in that if you wish to have multiple languages later or decide to change the term “likes” to “enjoys” you can do it easily where as if you stored a text string which would later be displayed you’d have more difficulty in replacing it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote an application about NFC in android,but I have a problem. When I
I'm trying to write a social networking application but I'm stuck with the wall
I have a stand-alone application that I wrote before I became test-infected. Its a
I wrote an application using ASP.NET MVC, in this application I have an Index
I have wrote an application that syncs two folders together. The problem with the
We have an application which stores its data in SQL Server. Each table has
We have an application wrote in C#, which broken into several projects. These projects
I wrote a simple winforms application which does some task every 30 seconds (using
I have a function I wrote that gets the height of the application without
I wrote a C++/QT application that uses a mysql database for its data. It's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.