I have this line of sql: It works perfectlly when I only need to insert, but it is failing when trying to update,it has an user_id that is primary key, so I hope thats what gets on the key, the other array variables $datosArr are strings, any ideas? Basically im trying to update when user_id exists , I want to
Tag: codeigniter
Creating a custom validation error message in CodeIgniter4
How can i create a custom error message for a custom validation. I’m using codeIgniter4 Okay guys so I’m a bit of a newbie with CI4 and I have created a custom validation file using the spark command ./spark make:validation and it works but the problem is I still don’t know how to customize the error message too for instance
Mutli Application Calling Model From Shared Site In Single Installation Codeigniter 4
How to call models from other multi application site in single installation codeigniter 4 ? The folder structure look like this : This is my example code : In Site1 Constants.php I have define a root directory to targeted the site2. This return : E:Projectwebsitesite2 Autoload.php I have setup PSR4. Then I Run SPARK COMMAND : And return Then NameSpace
In CodeIgniter 4 Flashdata displaying code redirecting to again again in the same page
In the CodeIgniter 4, I am using Flashdata for displaying error or success messages in view page and I am using the below code: It is not and as well as it redirect frequent in same page using this code! Answer use Flashdata instead of session. Once you reload the page, flashdata will disappear You can warp it with if
PhpExcel many columns causes the file to be broken
I am generating an excel file using phpexcel, the columns are 186 so I have created an array of the header columns and dynamically adding them the file is created well but the columns are broken as seen in the picture below. anyone ever encountered this issue? UPDATING THE QUESTION Now the xcel sheet has over 150 columns but not
why my sessiosn are not working in codeigniter 3?
I am using codeigniter-3 for developing the web part, i am using sessions for maintaining the user data once the user login if i click on any page or button the page is redirect to the login page. i have two projects of codeigniter-3 if i launch the project-1 in browser and login with credentials it’s navigating to the another
Codeigniter 4 : “Attempt to read property ‘name’ on array” error when executing ->findAll() on the BaseBuilder
this is my first time exploring Codeigniter 4 and I follow some tutorials to understand the basic crud process. Below are my controller where the model query is used. Then below are the index page where I want to display the list and the part where I have a problem. ‘name’ and ‘description’ are the column names stored in the
PHP force_download is downloading file with filename specified but calling it ‘file.pdf’
I am using force_download and everything works well except for the file being named ‘file.pdf’ and not ‘Daily_delivery_sheet.pdf’. The pdf looks correct, it’s just the filename that is wrong. I am stumped as to why this is happening. In the next function in the same file, the code is exactly the same and it is working perfectly. Here is my
CodeIgniter call_hook(‘post_controller_constructor’) exits
I have inherited a webapp using CodeIgniter I am trying to get it to run locally on my mac when I try to go to http://localhost ,i can see via the debug logs i connect ok to the db but when i get to this line in the file CodeIgniter.php it just stops. I see the first error_log, but then
Using a single form for insert and update function, Codeigniter
I’m trying to use a single form for inserting a new data and updating the value of an existing data.I have no trouble displaying the form, fetching the data and updating it, but when I’m trying to insert a new data, the form does not appear. Here’s my view My model And then Controller I found a question here and