creating an activity stream using mysql and html
Posted on 2013-01-20
I am trying to create an activity stream using mysql and html.
now, I assume that I would have a sql statement to pull the information from a database...
Now, I have four roles in this application. One of the roles monitors the activity of another, and the last two are independent.
That being said, I already understand that I would need a different SQL logic for each one, however the output dataset would be identical for each one.
How should I approach the relationship with the database? I have a MVC framework (Laravel) that I'm using to employ PHP.
Should I build the SQL in the business logic and send to the SQL to the database? Or should I use a stored procedure at the database end?
I am going to make this stream ajax, so I can prepend the <UL> with more activities if more enters the database. I also intend to only grab a days' worth of data, and do the "click for more" and append to the end of the <UL>. Kinda like facebook.
THe reason for this is how I could maintain movement of data as the activity grows.