Skip to content
Advertisement

Tag: codeigniter

Upload Images in two different paths Codeigniter

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,

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

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:

Advertisement