Welcome Guest, Not a member yet? Register   Sign In
HELP ME (COLLECTING DATA)
#1

[eluser]Unknown[/eluser]
Assume the real example that really like my project is the Facebook user's wall.

There compose of many messages and each message has many comments and number of 'like' and also each comment has number of 'comment's like' too.

If I have tables in DB like:

-Wall -> id,msg,postedby,postedon
-Comment -> id,wall_id,msg,postedby,postedon
-Like -> id,type(wall|comment),refer_id,userid

Plz, give me the algorithm/technique that I can create Model and Controller for collecting data and send it too view. I mean my problem is in the controller and view, because of in Controller I have to collect data from 3tables and send it to view in an array. But right now,it is not a good performance in my code.

How to collect those data and send to view with the view can does the loop easily.
#2

[eluser]Jan_1[/eluser]
Have a look/search for "multidimensional array".




Theme © iAndrew 2016 - Forum software by © MyBB