Skip to content
Advertisement

Tag: codeigniter

How to use foreign keys migration with database migrations. (errno: 150 “Foreign key constraint is incorrectly formed”)?

CodeIgniter 4 has a handy solution for migrations and seeders. Without the usage of foreign keys, everything is working perfectly. But when I use foreign keys I get “Unable to add foreign key”. This is because of the order of happenings: Quick example: So when I now run php spark migrate or php spark migrate:refresh the foreign key can not

how to push data object to array of object in php

i have data array nested in hire , how to push new value to array [‘data’] ? The data I have is an object and I want to insert the data into each array result AND this my code i have code I have a data object that I want to insert into [‘data’] How to do it Answer I

CodeIgniter 4: Pass $data to the View file

Can someone help me with this? I can’t figure out on how can I show the results on the View file. I tried using $this->load->view(‘list-logs’,$data); but it shows the error Call to a member function view() on null. CONTROLLER VIEW Answer if you use CodeIgniter 4 then you must call the view ont controller like this:

How to view data based on values ​from database ci3 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 months ago. Improve this question I want to make a recapitulation of absent data, which I display using a table in CI. The problem that occurs to me is that

Otp is not post in database

after user submit mail id otp will be sent to that email id but my code isn’t working it post the email id in database but not the otp. Please can any one help? Controller Code auth.php Model code user_model.php Answer In your controller you are actually passing three arguments to the $this->user_model->insert() instead of two. Second argument needs to

Advertisement