Basic Question for a newbie - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Basic Question for a newbie (/showthread.php?tid=1735) |
Basic Question for a newbie - El Forum - 06-23-2007 [eluser]deineMudder[/eluser] Hello everyone, i am totally new to CI. I watched the video tutorials, which are impressive. doing the tutorials step by step on my own server seem to get me some problems already tho. when i started to extend my controller with a db-query Code: $data['query'] = $this->db->get('user'); it results in Fatal error: Call to a member function on a non-object . now i havent made anything special at all, just following the video tutorial of "creating a blog in 20min". The scaffolding feature works nicely, tho if i try to connect on my own to the database it seems impossible to work. i was searching the forum already for over an hour to find a proper solution to my problem, but nothing seems to help. linux server php4 Basic Question for a newbie - El Forum - 06-23-2007 [eluser]deineMudder[/eluser] System: Linux 2.6.9-023stab044.1-smp #1 SMP Sat May 5 12:04:40 MSD 2007 i686 PHP Version 4.3.10-16 Basic Question for a newbie - El Forum - 06-23-2007 [eluser]deineMudder[/eluser] it seems i cant use any of the db core functions i just tried Code: $dbs = $this->dbutil->list_databases(); my whole function was Code: function user_authorize() i assume there is a general config/settings mistake on my installation please anyone give me a hint. Basic Question for a newbie - El Forum - 06-23-2007 [eluser]deineMudder[/eluser] not much info in the logfile too Code: DEBUG - 2007-06-23 12:24:29 --> Config Class Initialized Basic Question for a newbie - El Forum - 06-23-2007 [eluser]Flayra[/eluser] It's rather simple - you haven't loaded the Database library. Either load it in config/autoload.php or do $this->load->database(); Once that's done, all the functions should work properly. Basic Question for a newbie - El Forum - 06-23-2007 [eluser]deineMudder[/eluser] aw, thx alot. you made my day. and sorry i asked such a newbie question. works now Basic Question for a newbie - El Forum - 07-01-2007 [eluser]Unknown[/eluser] make sure you're not sorry for the newbie question. you'd be sorry if you had <i>not</i> asked. : ) |