Questions tagged as 'codeigniter'

2
answers

Merge php arrays

Hello Is there the possibility of joining array's? If yes, how can I do it? What I have Array ( [Dashboard_1] => 1 ) Array ( [Configuração_2] => 1 ) Array ( [Usuário_3] => 1 ) Array ( [Criar_4] => 1 ) Arr...
asked by 03.04.2018 / 16:31
1
answer

How do I sort a date field in mysql?

How do I sort a date field entered by the datepicker script in the format dd-mm-yyyy in Mysql? Note: Dates are being sorted only by day, ignoring the next month and year. And the date field is of type varchar (10). Ex: 02-05-2018 (dd-mm-...
asked by 02.05.2018 / 15:28
2
answers

Codeigniter - Active Record - Query - Database update method

Hello! I ask this question in order to get a doubt I have, and to be able to read other people's ideas, how I can insert or delete an item, a certain operador_id . As shown in the first image, when loading a operadores registrati...
asked by 02.02.2018 / 15:45
1
answer

MongoDb query works in shell, and does not work in PHP [closed]

I need help in querying the mongoDB database, in the shell I can perform the search normally, however, on the site, I get the error 'not authorized for query on'. I use the mLab service for database. I'm using the same user in the shell and i...
asked by 10.01.2018 / 13:51
1
answer

Load controller with hyphen or underline in URL - Codeigniter

I hosted my project made in CodeIgniter 3 on a server using Linux and PHP 7 and I can not load certain links, it gives 404 error. Controller Name Example: Relatorio_Detalhado.php Link in url: http://127.0.0.1/projeto/index.php/rel...
asked by 10.08.2017 / 22:18
2
answers

Make a SQL query with codeigniter

I would like to pull some information from my database called " site ", inside it would connect to the table: " posts " and in it wanted to show information such as: id, updated, title, description, link, image "with a limit of 3 and fit into...
asked by 17.08.2017 / 14:56
2
answers

Query sql codeigniter

I have a table with dates and I would like to create a query that returns records with dates before the current day but I could not mount this query; below is my code and BD image: function get_late_events($sort = 'idevento', $order = 'asc', $...
asked by 01.07.2017 / 17:14
1
answer

Display a foreach item only once (if this item is within the if condition)

Hello! For a chat, I want to display the message date only once, this being; in the first message only. Example: ONTEM Mensagem 1 Mensagem 2 Mensagem 3 HOJE Mensagem 1 Mensagem 2 Mensagem 3 Today, what I have is working li...
asked by 08.02.2017 / 20:34
2
answers

Get data using join in two table 1 for many

Good morning, I need to perform a select of two tables that are related 1 to many: Table 1: Products Table 2: Price group I need to get all prices in the price group table, which can be 1 or more. In my case of the select below it ev...
asked by 20.02.2017 / 15:04
1
answer

How to make the answer enter immediately after the question?

I have a form and I want to send the questions and answers to a database. I took the question in the form of text and sent it to an input hidden field and I want to insert the question and answer in the database: <label for="pergunta">...
asked by 04.12.2016 / 19:16