codeigniter

How to query employee details and relate their performance metrics?

只谈情不闲聊 提交于 2020-06-07 06:59:25
问题 I am fetching the id, first name, and last name of all employees that are approved and not archived. Then I am looping these results and using the ids to query other tables to collect some count data. I tried the below code, but I am not getting the expected output. $queryEmp = " SELECT id, firstname, lastname FROM tbl_employee as e WHERE is_archive=0 and is_approved=1 "; $getQuery= $this->db->query($queryEmp); $result= $getQuery->result(); foreach ($result as $key=> $value) { //echo "<pre>";

How to query employee details and relate their performance metrics?

早过忘川 提交于 2020-06-07 06:58:09
问题 I am fetching the id, first name, and last name of all employees that are approved and not archived. Then I am looping these results and using the ids to query other tables to collect some count data. I tried the below code, but I am not getting the expected output. $queryEmp = " SELECT id, firstname, lastname FROM tbl_employee as e WHERE is_archive=0 and is_approved=1 "; $getQuery= $this->db->query($queryEmp); $result= $getQuery->result(); foreach ($result as $key=> $value) { //echo "<pre>";

can't send email with codeigniter

孤人 提交于 2020-06-04 03:01:31
问题 i try to send mail in codeigniter like this : public function send() { $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'smtp.googlemail.com', 'smtp_port' => 587, 'smtp_user' => 'myemail@gmail.com', 'smtp_pass' => 'mypass', 'newlin' => "\r\n" ); $this->load->library('email', $config); $this->email->set_newline("\r\n"); $this->email->from('myemail@gmail.com', 'Admin Re:Code'); $this->email->to('toanotheremail@gmail.com'); $this->email->subject('Percobaan email'); $this->email->message(

Mail not sending from hosted codeigniter application [duplicate]

让人想犯罪 __ 提交于 2020-06-02 05:34:19
问题 This question already has answers here : PHPMailer GoDaddy Server SMTP Connection Refused (19 answers) Closed 3 years ago . Gmail smtp is configured successfully in localhost, but the same thing not working in remote after moved to godaddy server. It is not send any mails from the application. This is my gmail smtp configuration. $config ['protocol'] = 'smtp'; $config ['smtp_host'] = 'ssl://smtp.gmail.com'; $config ['smtp_port'] = '465'; $config ['smtp_user'] = 'xxx@gmail.com'; $config ['smtp

Mail not sending from hosted codeigniter application [duplicate]

孤街浪徒 提交于 2020-06-02 05:33:42
问题 This question already has answers here : PHPMailer GoDaddy Server SMTP Connection Refused (19 answers) Closed 3 years ago . Gmail smtp is configured successfully in localhost, but the same thing not working in remote after moved to godaddy server. It is not send any mails from the application. This is my gmail smtp configuration. $config ['protocol'] = 'smtp'; $config ['smtp_host'] = 'ssl://smtp.gmail.com'; $config ['smtp_port'] = '465'; $config ['smtp_user'] = 'xxx@gmail.com'; $config ['smtp

converting a related database table object into a nested array - PHP

你说的曾经没有我的故事 提交于 2020-06-01 07:38:45
问题 i have some dummy related data in my table "you can take a look at it bellow". i want to nest the data according to their relationships into one array. Table Data: +-----+------+--------+ | uid | name | parent | +-----+------+--------+ | 1 | A | 0 | | 2 | B | 1 | | 3 | C | 1 | | 4 | D | 2 | | 5 | E | 3 | | 7 | G | 3 | | 9 | H | 4 | | 10 | I | 4 | | 11 | J | 7 | +-----+------+--------+ the array is going to be like array('A' =>array('B'=>'D','C'=>array(...)) . am currently using codeigniter

codeigniter pass array in session and retrieve

爷,独闯天下 提交于 2020-05-29 10:30:25
问题 i want to pass array in codeigniter session and want to retrieve it in another function following is my code where i pass array to session $deliveryData = array( 'User_ID' => $this->input->post('User_ID'), 'Order_dArea' => $this->input->post('Order_dArea'), 'Order_dAddress' => $this->input->post('Order_dAddress'), 'Order_PMethod' => $this->input->post('payment_mode'), 'Order_dMdate' => $Order_modifieddate ); $this->session->set_userdata('deliverdata', $deliveryData); i retrieve session in

CodeIgniter removing index.php from url

放肆的年华 提交于 2020-05-24 07:30:08
问题 My current urls look like this [mysite]index.php/[rest of the slug] . I want to strip index.php from these urls. mod_rewrite is enabled on my apache2 server. In config , $config['index_page'] = ''; My codeignitor root .htaccess file contains, RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L] But still it is not working. Where am I going wrong? 回答1: Try the following Open config.php and do following replaces $config[

Codeigniter - Append rows in view then add those rows to database table

孤人 提交于 2020-05-21 07:34:04
问题 I have a form for end users, and in one section of the form they will need to append rows to continue to add their data. No matter how many rows I append or post, whether it's 2, 5, or 10, only the last row of data makes it to the database. TABLE STRUCTURE sub_name sub_tests sub_dx Jimmy's Deli 11 3 Sally's Shop 31 2 APPEND SCRIPT <script type="text/javascript"> $(document).ready(function(){ var i=1; $('#add').click(function(){ i++; $('#dynamic_field').append('<tr id="row'+i+'" class="dynamic

Migrating old .net application to new php application: getting issue while implementing password encrypt/decrypt with sha1 alogorithm

烂漫一生 提交于 2020-05-18 18:36:13
问题 Migrating old .net application to new php application: getting issue while implementing password encrypt/decrypt with sha1 alogorithm As I mentioned, I am trying to implement password encryption and decryption (in new php app) while registration and login flows. I am using sha1() php function for password encrypt and decrypt. I have to implement sha1 functionality through which old app (.net app, with sha1 algorithm) users should also get new php app login with old passwords . My php sha1