Questions tagged as 'codeigniter'

4
answers

Take variable from an array in PHP with CodeIngiter

Hi, I have the following in CodeIgniter: MODEL: public function GetHoraPaciente($rut_paciente,$estado){ // muestra todoas las horas pedidas del paciente $this->db->where("rut_paciente",$rut_paciente); $this->db->where("...
asked by 02.03.2017 / 22:00
1
answer

Special characters Codeigniter PHPExcel

I have a function that extracts data from a DB and exports them to an excel file, the problem is that it does not show any characters or special characters (No.) This is my code: $this->excel->getActiveSheet()->setCellValue('I16',...
asked by 22.10.2018 / 20:59
1
answer

Codeigniter 3 MY_Controller not found

The error is as follows, by extending the Register class of the MY_Controller to create the user login, it throws me the following error. Any ideas? He says he has not found the class, but even adding it does not find it. Driver for...
asked by 27.04.2017 / 12:26
2
answers

Unknown column when using WHERE (ERROR) codeigniter

I am trying to show a value of the Database in an input, however I get the following error. Why is this happening? A Database Error Occurred Error Number: 1054 Unknown column '17811942-4' in 'where clause' SELECT 'horario'.'hrs_ini' FROM 'h...
asked by 04.10.2017 / 16:23
2
answers

Modal of bootstrap does not show its corresponding content using CodeIgniter

Situation: I have the following view in CodeIgniter that shows a table with users, one of the fields of each user is the "Edit" option, which when clicked on it opens a modal in which the user fields can be modified , but in this cas...
asked by 12.08.2016 / 14:11
1
answer

Error UPDATING Duplicate entry '1' for key 'PRIMARY'

I'm trying to update a record in the database and I get this error: <h1>A Database Error Occurred</h1> <p>Error Number: 1062</p> <p>Duplicate entry '1' for key 'PRIMARY'</p> <p>UPDATE 'compra'...
asked by 28.06.2018 / 15:28
1
answer

Show records grouped by month in a MYSQL query

I have the whole system created, only the reports are missing, the main table is averias which has as attributes campo , fecha and other irrelevant, the SQL I have so far is as follows: SELECT centro, MONTH(fecha) as mes, C...
asked by 29.05.2018 / 03:20
1
answer

Upload image with codeigniter

Controller: public function generate($id,$type){ $method = $_SERVER['REQUEST_METHOD']; if($method != 'POST'){ json_output(400,array('status' => 400,'message' => 'Bad request.')); } else { $...
asked by 22.03.2018 / 08:18
2
answers

Take a value out of the Codeigniter query

I could not use the result thrown by a query of a model in Codeigniter as a parameter to be able to execute another query that requires the above information. Code of the model : public function datosuser($codigo){ $this->db...
asked by 11.02.2018 / 04:57
1
answer

Retrieve data from stdClass Object

I use the codeigniter framework, I call from the view a selected data from a drop-down list in the following way: $nombre_activo = $this->input->post('tipo_activo',true); With this data I consult the database so that it brings me the...
asked by 11.11.2017 / 06:22