use active records in library |
Libraries are a little different in they don't have immediate access to the `$this` super global.
There's a couple ways to do it but here's how most will tell you to... PHP Code: public function __construct() Then, anywhere you use '$this->' use '$ci->' instead, for example: PHP Code: public function userExists($id){ |
Messages In This Thread |
use active records in library - by Valerekk - 10-21-2017, 07:10 PM
RE: use active records in library - by enlivenapp - 10-21-2017, 07:41 PM
RE: use active records in library - by Valerekk - 10-22-2017, 06:22 AM
RE: use active records in library - by InsiteFX - 10-22-2017, 03:29 AM
RE: use active records in library - by InsiteFX - 10-23-2017, 08:53 AM
|