I’ll try to upload an Images into two different path, but it always uploaded in single path only, here’s my code in a model : The upload function (also in the model) Only the _uploadImage function worked, but the _uploadImage2 not work Can you tell me what’s wrong? Answer The problem is that you have already initialize the upload library,
Tag: codeigniter
Codeigniter Multi Save Upload Path
I try to save the uploaded file in 2 paths, one inside a folder and contain the id and one outside the folder Here’s my code : When I run that code, the result is stucked Can you help me what’s wrong? Answer You set the upload_path key twice, which just overwrites itself. You’ll need to process the upload wholly
Get average of average columns in mysql
I am having a table that stores ratings of a restaurant. As shown in the below image. I am trying to get the average of all these columns in which I am being successful but I also want an average of all these averages as a main average. I tried the below query but I am getting 3 as average
How do I get the total number of students who are only active
I have two tables that store data for students – the students table and student_session table students table structure student_session table structure Now, I’ve been able to get the total number of students in a class using this query However, there are some students who have been disabled for non-payment of school fees or those that have left the school
Fetch featured product only from product table in Api
Product Table where i want to fetch only featured product. I have defined a column in database product_type in which four types of products(hot deals, newly listed, deals of the day and featured product)strong text can be listed which is optional. Blockquote When i try to fetch whole product list in api i get the result but i want to
How to update multiple or single row in single query using where multiple or single id using codeigniter?
I want to update multiple or single row in database in one query where multiple ids or single id post from the form. I couldn’t find it works in update batch. I don’t know how to do it. I have already searched on google on how to make it but I have no luck. Your answer is very much appreciated.
Unable to add watermark image in existing PDF
I am using TCPDF to add an image watermark to my existing pdf. Only a few of the pdf files are loading the watermark properly (2nd image) and some of them do not support a watermark image (1st image). Also, I want to remove the watermark from the last page of the generated pdf. I am sharing a pdf sample
Why can’t I export MySQL table values as a CSV file in this Codeigniter application?
I have been developing a blogging application with CodeIgniter 3.1.8 and Twig. The application has a newsletter subscription system. I make use of a table named newsletter with 3 columns: id, email and subscription_date. In the class Subscribers controller, I have created an export() method intend to export subscribers as a CSV file: In the Newsletter_model model: The export form:
uploading image not working in codeigniter 3
i’m new learning codeigniter 3, i have problem that i can’t upload image in edit method. i’m really stuck, i already figure it out from the internet and documentation but there is no answer and my …
subcategory will not show as parent category
I am trying to get my subcategory based on the category here is my code