0

hello to all,

how to make global data from mysql

example:

data1 from table
data2 from table
...

i want to make the data[] global so that i can call anywhere in the page.

i'm using php

thanks,

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by Stefano Mtangoo
0

Using globals is bad Idea. If data is not too heavy, you can use sessions to store them persistently!

Hi evstevemd,

Thank you for your reply. But there's a lot of records needs to pull out from db tables. Is this possible? We're using an MVC structure.

0

Hi evstevemd,

Thank you for your reply. But there's a lot of records needs to pull out from db tables. Is this possible? We're using an MVC structure.

If you need to use big data, like say tables, then do page catching. Store let say range of data as session variable and write them as let say cache.html with tables. If the data in session is not changed then use catched file if changed pull and cache data!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.