Skip to content
Advertisement

Tag: codeigniter

Sql list unregistered classroom

There is one student. This student is enrolling in classes. What I want is to list the classes where this student is not registered. My SQL query is like this. Where am I going wrong? Answer I had to assume your table structure and I hope I got it right. The classic approach would be with LEFT JOIN and IS

Joining Query with codeigniter Model

Please help me how can I get only response where activities.activity_id = response.activity_id? here is my CI_model My Activities table My Response Table My users table Answer Try with this: You need to add aliases to the tables in order to build a more simplified and ordered query, in this case the aliases are a, b and c. UPDATE: I

Ajax request from PHP don’t return me an Array

I’m trying to return an array from a PHP script in Ajax, however, it seems to not work, it returns me a string rather an Array. I’m using CodeIgniter Framework, there is my .php code : And there is my Ajax request : My getAll() function just select all from the database, however i’m only using the temperature & date

Counting Rows Includes JSON by Id in Codeigniter

We have one groups table name as “groups” (There is mail groups) We have one person table name as “person” (There is persons who has in mail groups) We saved person in the “person” table with json_encode by group ID. Because a person can belong to more than one group. The problem is we can not get count rows of

Can we fire a database query in config/constants.php file to make constants dynamic? (Php Codeignitor)

I have tried to place this at the bottom of the config/config.php but it is throwing this error: An uncaught Exception was encountered Type: Error Message: Class ‘CI_Controller’ not found Filename: E:xampp74htdocsjrvssystemcoreCodeIgniter.php Line Number: 369 Please suggest me some solution for this. If this is not possible then what else we can do to make constants dynamic? Answer constants.php is

can i use md5 hashed values inside $this->db->escape() in codeigniter,

when i tried to use md5 hashed values inside $this->db->escape() i’m getting error like below when i tried to fetch count of results “Call to a member function num_rows() on bool” my code Answer You are making double escape as i see it. Remove the single quotes from $this->db->escape(). Or the better way is to set the variables in the

Advertisement