php - Use phpcassandra in codeigniter -
Hello I am new to the Kassandra database. I am trying to do a project in the coordinator with the Kosindra database. I have downloaded phpcassandra files through the link given below.
When I'm trying to automatically load my casssandra.php in the codeigniter, I could not find any existence: Cassandra error Why did I get this error and how to resolve this issue?
You have to create a cover for this if you want to use it as a library.
I suggest that you take the route. You can check out a suitable library.
If you use this special library, then in this way you will have to go to work in Codeigniter.
composer.json {"require": {"php": "& gt; = 5.3.0", "thobbs / phpcassa": "1.1.0 "}} index .php " ../composer/autoload.php "is required; system / core / codeigniter.php // where the codiginator starts to load the main controller // $ cassandraDB will be in global scope, therefore You can write a cover $ cassandraDB = new connectionpool ('localhost'); // Then right after // if (class_exists ('CI_DB') and isset ($ CI- & gt; db)) // {// CI-> DB- & gt; Close (); //} $ cassandraDB-> Close (); User Model
Apply this how you work in your model
public function __construct () {// You may need ASD $ Casandra DB! $ This- & gt; User = new column family ($ cassandraDB, 'standard1'); }
{"require": {"php": "& gt; = 5.3.0", "thobbs / phpcassa": "1.1.0 "}} index .php " ../composer/autoload.php "is required; system / core / codeigniter.php // where the codiginator starts to load the main controller // $ cassandraDB will be in global scope, therefore You can write a cover $ cassandraDB = new connectionpool ('localhost'); // Then right after // if (class_exists ('CI_DB') and isset ($ CI- & gt; db)) // {// CI-> DB- & gt; Close (); //} $ cassandraDB-> Close (); User Model
Apply this how you work in your model
public function __construct () {// You may need ASD $ Casandra DB! $ This- & gt; User = new column family ($ cassandraDB, 'standard1'); }
Comments
Post a Comment