Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 2.0 Database Tutorial required
#11

[eluser]WanWizard[/eluser]
Difference between this and what?

PHP4 style contructors (function name = class name) and PHP5 constructors (__construct)? If you are calling a parent method (any method), you simply have to use the correct name.

In 'old' CI, PHP4 style was used, and you had to use parent::CI_Controller(), in CI 2+, you need to use parent::__construct().
#12

[eluser]ZeusChicago[/eluser]
[quote author="Dimitri Backaert" date="1304604564"][quote author="InsiteFX" date="1304580596"]It should be like this:
Code:
// NOTE: This is not needed if you are not setting anything!
public function __construct()
{
    parent::__construct();
}

InsiteFX[/quote]

Can you point out the difference? I don't really see it.
Thanks![/quote]

CodeIgnitor 1.7.2 parent::__contruct()
CodeIgnitor 2.x parent::CI_contruct()

Codeignitor 2.x added CI in front of all CodeIgnitor object.
#13

[eluser]cideveloper[/eluser]
To Dimitri

Your code is fine. I copied it into my ci installation and it works.

What is your url? What is the file name? are you using an .htaccess file?

Case sensitivity matters in the above answers.

Also what does your model look like?
#14

[eluser]Arministrator[/eluser]
Edit: Delete, rather. Tried to help but didn't see it right.




Theme © iAndrew 2016 - Forum software by © MyBB