Skip to content

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…

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 proc…

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

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…

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