Skip to content
Advertisement

Tag: codeigniter

How to display a column of data when the parent variable might not be declared?

I am generating some dynamic content in the view layer of my codeigniter project. The trouble is, I am getting the following error in my ternary expression: Parse error: syntax error, unexpected token “foreach” How can I display the looped category_name data separated by <br/> tags without generating this error when $log->category is not declared? Answer The code you have

How to remove cache files or images in Codeigniter 3.1.9

I have an image gallery where too many images are saved and displayed on a single page with update option with every image. When I upload a fresh image, it works fine. But when I change an image by uploading a new image file, it works fine on localhost (xampp) but not working on cpanel server and digital ocean server

php/codeigniter firestore update giving error InvalidArgumentException Input missing required one or more required keys

I am trying to connect admin panel on php-codeigniter with firestore/firebase . Insertion,Fetch and Set functions are working fine but when I try to update ( update a single key ) it gives InvalidArgumentException . I am following the official documentation here . I am new to firestore. Suggestions are appreciated. Here’s my code Error Output Answer According to my

how to select multiple sum() quantity

i want to select the sum of quantity(qty) from orders table,there are 2 category dirham (kupon_id = 2) and dinar (kupon_id = 1) i already got the sum of kupon_id = 2,but i dont know how to get sum of qty where kupon_id = 1,here the example : my model : i tried join the same table with difference WHERE

Failed while installing a package using composer

iam tryin to use a cart package by using this command composer require jason-napolitano/codeigniter4-cart-module and it’s failed. this is what it said is it because my minimum-stability in composer.json is set to “stable”? Answer I presume you created your project by using composer create-project codeigniter4/framework. This effectively created a clean project for you without the .git folder, thus removing any

Connecting Database Codeigniter 4 With Custom Ports

So, I’m trying to connect to my database container from my webserver container. I currently use Codeignter 4 for my PHP framework. Everything goes well in terms of communicating between different containers because that container is inside the same networks. Inside webserver container, I’ve tried to ping from and to database container with no problem, All the port is accessible

Advertisement