codeigniter-query-builder

Showing the count of my user and display it on badge. (Codeigniter)

心不动则不痛 提交于 2021-01-29 04:00:01
问题 Newbie here. I did an ajax to count the users and display it on my badge, however, whenever I'm clicking on 1 button (Modal with table), it is displaying on all badges. For example. I have 4 users in my first row modal table. The #4 count is displayed to all of my badges. Which is something that is weird. My target is to display the count in my badge dynamically. I have provided a video and images below for better explanation. https://streamable.com/z6dqgi << This is the output of what I made

Want to upload three different images to database through one form in code igniter

假如想象 提交于 2020-12-08 01:49:49
问题 I am preparing a CMS which has Mission, Vision, and Why_Us section. I want that while editing I should be uploading three images separately with different text fields provided against each section. The entire entry and the images should reflect in the SQL Database. The sample codes are mentioned below, please assist. View code <form method="post" action="<?php echo site_url('about_us/insertdata');?>" enctype="multipart/form-data"> <!-- =========================================================

Codeigniter batch update for checkbox

允我心安 提交于 2020-11-29 03:47:05
问题 I have a situation like this, I want to update some data where the input are checkboxes, I was tried this code below. Data already saved in database, but data saved in another row, For example : I checked color red, yellow and grey for BirdA and I checked dark and blue for BirdD at the same time. In database, color for BirdA saved correctly, but for the 2nd bird, dark and blue saved on BirdB ( Should be save on BirdD ) I want to solve my problem above, so data should be save in the right

how to view individual field of the table in codeigniter

喜夏-厌秋 提交于 2019-12-25 02:19:08
问题 I have created following table in mysql I want to retrieve one of the field i.e abstract or author or Title by using id dynamically in view field. These are my model, controller and view code. Model:This is my model $this->db->select("*"); $this->db->limit(10); $this->db->from("abcde"); $query = $this->db->query("SELECT * FROM abcde ORDER BY DocumentID ASC"); Controller: this is my controller here $this->load->model("Sample_model"); $data["fetch_data"] = $this->Sample_model->fetch_data();

How to insert dynamic data in Codeigniter?

我怕爱的太早我们不能终老 提交于 2019-12-11 06:48:19
问题 I just want to insert dynamic generated input field data into database . My db table having three fields , id(Auto Increment), product_name and rate . I'm trying to insert bulk data into database using dynamically generated input fields where I can add/remove input fields manually. I created the input fields as <input class="form-control" placeholder="Product Name" name="prodname[]" type="text"> <input class="form-control" placeholder="Product Rate" name="prodrate[]" type="text"> This is my