Loading from Mysql Confings |
[eluser]pisio[/eluser]
Hi all. I wonna ask you , how i can get from mysql data and set it in same global varibian. Code: CREATE TABLE IF NOT EXISTS `config` ( a = Code to get confings b = user/edit exp .... c = view page for user/edit And now i can use data from "A" in "B" and "C" , like as $this->db->get_where and $this->load->view I'm sorry for my bad english. If you don't understand me don't wory ;p be happy
[eluser]danmontgomery[/eluser]
Code: $config = $this->db->get('config');
[eluser]elmne[/eluser]
If you are concerned about your english or cannot understand some of the replies, try using Quote:translate.google.com I used it to view some of your comments and this is what i got Quote:Bulgarian Just paste any text into the field and you will see the translation immediately.
[eluser]pisio[/eluser]
[quote author="elmne" date="1277407561"]If you are concerned about your english or cannot understand some of the replies, try using Quote:translate.google.com I used it to view some of your comments and this is what i got Quote:Bulgarian Just paste any text into the field and you will see the translation immediately.[/quote] The text is not important. Important is how to make data in same global for the site variabian.
[eluser]elmne[/eluser]
Since you want to put values from database to global variables so that the values are accessible to all users, look at this post ellislab.com/forums/viewthread/89488/ Someone there used a workaround. But if it's per user and not all users, you could use sessions. ---- Try looking at this post where someone used constants instead of globals Quote:http://stackoverflow.com/questions/25271...l-variable also look at codeignitor.com/user_guide/libraries/loader.html you can use this to load your variables as you will find a description on that page that states Quote: |
Welcome Guest, Not a member yet? Register Sign In |