codeigniter

Value of the table column with comma need to be separated while showing separated data in a view

[亡魂溺海] 提交于 2020-01-07 06:55:06
问题 I am being working on a project where i have a value in table with column "teams" and on that column i have one record with data like this "India, Nepal, Pakistan, Singapore". In a view page i need to show the column "teams" with one value in a row. Like this: <select name="tournament_team" class="form-control" > <option value=''>--- Select Team ---</option> <option value='india'>India</option> <option value='nepal'>Nepal</option> <option value='pakistan'>Pakistan</option> <option value=

Codeigniter - Weird parameter 'favicon.ico'

房东的猫 提交于 2020-01-07 06:50:12
问题 I am working with Codeigniter PHP framework. I have the typicall Pages controller for displaying pages. I also added code for storing in the session variable in which page was the user before login. The thing is I'am getting as parameter 'favicon.ico' which make no sense because the page that was called was 'login' and displays well after that. First as a temporary solution I checked the $page variable for the 'favicon.ico', and the weird thing was that after checking it I had inside the

How to query (fetch) a multiple table of mysql database as a single table in codeigniter

我只是一个虾纸丫 提交于 2020-01-07 06:13:28
问题 I have three database table 1st vedd_plan_task :: task_id | task name 2nd plan_task_mapping :: task_mapp_id | plan_id | task_id 3rd tbl_plan :: plan_id | plan_title | plan_price | plan_desc In this table i mapped the 2nd table with 1st & 3rd. (2 table's value come from 1st & 3rd) for PLAN i call the data from PLAN TASK tbl. and submit the data in two different table. now i have to show the database as table but i can't find the way to get a task_name form mapping table. I want a table with

Post variables not sending : php / apache / codeigniter

和自甴很熟 提交于 2020-01-07 05:27:39
问题 I got a problem with an application built in codeigniter. The $_POST variables are not working, var_dump($_POST) returns array(0) In online environment works fine, so it's localhost problem. I think its the apache conf or the .htacces conf, I'm adding the .htacces used in this project. Any help its really appreciated, thanks. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ $1 [L,R=301] RewriteCond %{REQUEST_URI} ^system.*

CodeIgniter - order my 'posts' by month?

…衆ロ難τιáo~ 提交于 2020-01-07 05:05:33
问题 In my website I'd like to create an 'archive' list to categorise my posts. My posts table is set up like so: id | post_title | post | pubdate | year | month Currently this model function pulls the posts: function getNews(){ $data = array(); $this->db->order_by("id", "desc"); $Q = $this->db->get('posts'); if ($Q->num_rows() > 0){ foreach ($Q->result_array() as $row){ $data[] = $row; } } $Q->free_result(); return $data; } However, is it possible I can create a list like the following? July (12)

how to load model from one server to different client application for provide database access stuff in codeigniter

可紊 提交于 2020-01-07 04:58:09
问题 I try to provide my model files in server that can be shared to the different clients application. Consider the following Theoretical image, provide model files as cdn link I don't know how to achieve this. Please give suggestion to solve my problem? 回答1: It depends on how you're fetching models from other server. If you're fetching as a files with php extension and saving temporarily in your server, then you have to give path of that directory in /system/core/Loader.php file, where it looks

how to load model from one server to different client application for provide database access stuff in codeigniter

删除回忆录丶 提交于 2020-01-07 04:58:05
问题 I try to provide my model files in server that can be shared to the different clients application. Consider the following Theoretical image, provide model files as cdn link I don't know how to achieve this. Please give suggestion to solve my problem? 回答1: It depends on how you're fetching models from other server. If you're fetching as a files with php extension and saving temporarily in your server, then you have to give path of that directory in /system/core/Loader.php file, where it looks

Issue trying to fetch data codeigniter

筅森魡賤 提交于 2020-01-07 04:47:06
问题 I got this errors in the view file (and so many more about the indexes id,username, name, lastname, password, type, status, date): https://i.gyazo.com/d8bda30b1fafce47ed2125d590c5b4e4.png I gotta show ONLY the rows that contain "simple" users ("type = 1") which are stored inside the table "usuarios" Table "usuarios". "usuarios" includes:(id,username,name,lastname,password,type,status,date). When i enter the system as an ADMIN the program must show a table with all the "simple" users stored in

Decrypting parameters Codeigniter

怎甘沉沦 提交于 2020-01-07 04:27:07
问题 I have a small problem. I am sending a mail when an item needs attention. I am getting the encrypted string, but when I decrypt it I get nothing .. Anything wrong in my code? Thanks in advance Encrypting parameter (ID): $this->load->library('encrypt'); $yes = site_url('job/itemFree/?id='.$this->encrypt->encode($itemid)); $no = site_url('job/itemExtend/?id='.$this->encrypt->encode($itemid)); Decrypting : $this->load->library('encrypt'); $id = $_GET['id']; $id = $this->encrypt->decode($id);

how to configure SMTP in codeigniter application?

谁说我不能喝 提交于 2020-01-07 04:11:12
问题 I'm new to SMTP , sendmail , and mail() function in php codeigniter. I'm trying to configure SMTP mail protocol in my codeigniter application. Make all settings, SMTP port, sender mail, user id, password for single user i.e. admin@example.com . It working fine. My question is, it is possible to setup two SMTP user account in single application ? For example I want to set info@example .com and admin@example.com , so these two users can send mails to customers. 回答1: You can use it by only