Questions tagged as 'codeigniter'

1
answer

store information in a foreach cycle

I have a foreach cycle to go through all the states and I need that all the states are stored in the variable but only the last state is being stored, how can I do so that it does not substitute the value for each iteration? here the controller...
asked by 18.12.2017 / 16:42
2
answers

how to interpret a string as a php variable

I intend to do this: echo $.'variable'; as a result of this: //Solicitamos a la BD todas las id de la tabla categorias $data = $this->Global_model->get_select_array('idcategoria', 'categoria_tmp', TRUE); //rastreamos to...
asked by 09.11.2017 / 21:50
2
answers

Problems with css, js and addressing when passing to the server with codeigniter

Some time ago I am working on a project that I developed in Codeigniter 3.x where I carry out the typical actions of CRUD, in addition to the call to JOBS in SQL Server. When testing the service locally, it does not present any inconvenience,...
asked by 17.11.2017 / 13:56
1
answer

Error connecting to MySQL with CodeIgniter

I try to connect to MySQL but I get the following error    An uncaught Exception was encountered       Type: Error       Message: Call to undefined function mysql_pconnect ()       Filename: > C: \ xampp \ htdocs \ CodeIgniter \ system...
asked by 16.10.2017 / 21:03
2
answers

Update two tables at the same time (Update)

Hi, I have a problem updating two tables at the same time    Appointment in block /*Si se ejecuta el update*/ if($this->miembro->editar_miembro($editar_miembro, $id_usuario)) { /*Redireccionamos al listado de usua...
asked by 22.06.2017 / 16:00
3
answers

Problem with the accents in url

Query: Code: Link: example a link: localhost / codeigneter / search / region-of-arica-and-parinacota / aysen     
asked by 30.03.2017 / 16:22
1
answer

SQL injection in PHP with a CodeIgniter midleware

I'm with a question with a function to prevent SQL injection: public function f_LIMPIARINPUT($a_variable) { $valor = $a_variable; $valor = str_ireplace("SELECT", "", $valor); $valor = str_ireplace("FROM", "", $valor); $valor =...
asked by 15.03.2018 / 16:43
1
answer

Obtain data randomly from the database with CodeIgniter

It turns out that I need to get random data from the database with the CodeIgniter framework. in database I have a table called phrases and within it two fields: Type and phrase In the field type I have 1 which has...
asked by 23.12.2016 / 16:07
2
answers

Validation checkbox group with javascript or jquery

searching the web I can not find the solution, so I ask for help, I need to validate a checkbox group that is generated for each row of a table, what I need is that you can select a check only if the row previous one was selected first, that is...
asked by 12.11.2018 / 14:39
1
answer

Because I can not filter by date, Codeigniter

Now try using: 1.- $this->db->where('a.fecha >= "'.$date1.'"'); $this->db->where('a.fecha <= "'.$date2.'"'); 2.- $this->db->where('DATE(a.fecha)',$date2); 3.- $this->db->where('a.fecha',date('Y-m-d',st...
asked by 15.07.2018 / 04:12