PHP 8.2.32
Preview: ProductEnquiryModel.php Size: 994 B
/home/ecopackply/www/app/Models/ProductEnquiryModel.php

<?php

namespace App\Models;

use CodeIgniter\Model;

class ProductEnquiryModel extends Model
{
    protected $table = 'tbl_product_enquiry';
    protected $primaryKey = 'ID';

    protected $allowedFields = [
        'productID',
        'name',
        'mobile',
        'email',
        'message',
        'address',
        'created_at'
    ];

    protected $useTimestamps = false;
    public function getEnquiriesWithProduct()
    {
        return $this->select('
                tbl_product_enquiry.*,
                tbl_product.productName,
                tbl_product.productSize,
                tbl_product.productThicknes,
                tbl_product.productGrade
            ')
            ->join('tbl_product', 'tbl_product.id = tbl_product_enquiry.productID', 'left')
            ->orderBy('tbl_product_enquiry.ID', 'DESC')
            ->findAll();
    }

    public function totalCount(){
        return $this->countAll();
    }



}

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
0 B lrw-r--r-- 2026-01-27 08:07:40
Edit Download
527 B lrw-r--r-- 2026-01-27 08:07:40
Edit Download
496 B lrw-r--r-- 2026-01-27 08:07:40
Edit Download
994 B lrw-r--r-- 2026-01-27 08:07:40
Edit Download
669 B lrw-r--r-- 2026-01-27 08:07:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).