Questions tagged as 'select'

1
answer

AngularJS and Image Picker - I can not capture content from the picker

I have the following question: If I click on the picker (in the box), I can capture the contents of the ng-model "first game" and manipulate it in javascript as needed: <p>Escolha o jogo</p> <select class="image-picker show-...
asked by 02.10.2018 / 21:20
1
answer

Help with Join in Mysql [duplicate]

I found several questions / answers about join on the site, but I still can not create the command I need. What I need is the following: I have the following tables: item (I have two items registered) id descricao --------------- 1 - d...
asked by 06.08.2018 / 13:35
3
answers

How to use checkbox group to do search with php and mysql

I'm developing a real estate site with a search, where one of the filters is the neighborhood. Currently it's a dropbox, but I'd like to switch to a checkbox group so I can select more than 1 neighborhood at a time, how can I do that? I thoug...
asked by 23.07.2018 / 16:14
1
answer

Help with ORDER BY clause by string

I have the following select command: select nome, case grau when 0 then 'QS' when 1 then 'CI' when 2 then 'CDC' when 3 then 'QM' end grau, case faixa when 0 then 'NÃO' when 1 then 'SIM' end faixa, mensalidade from socio order by grau, nome...
asked by 04.08.2018 / 05:55
1
answer

Select using an array?

I have the following array: var arr = ['A', 'B', 'C'...]; And in my database I have the categoria column where the values are saved in the following way: 'A,B,C...' , how could I make a SELECT by taking each category of...
asked by 07.07.2018 / 22:48
1
answer

Make two queries in one table in MySql

I have a table in MySql database where I will make a query. This query needs to be done as follows: For those who have a plan on the site: Allow search by: name, category (different table), address, neighborhood (different table), keyword...
asked by 15.06.2018 / 02:43
1
answer

How to compare two Oracle DateTime columns

I have a column where I enter a date when the event happens (local storage), and the date the event is sent to my system. The difference between the date of the event and the date of submission can not exceed 168 hours (7 days). I'd like t...
asked by 15.06.2018 / 15:37
1
answer

How to sort the result of a query by a column where there is a value in another column in the same table?

I have a table with several columns, and I want to sort the results by the values of one of the columns where another column in the same table is equal to a value. I have already tried to implement the query with CASE , IF's and...
asked by 18.05.2018 / 16:52
2
answers

How to bring SQL result grouped by year and within months

I have a table like this: data |id 2017-02-01 00:00:00|1 2017-02-01 00:00:00|5 2017-04-01 00:00:00|2 2018-02-01 00:00:00|3 2018-04-01 00:00:00|4 Then I make a query with PHP in Mysql that brings me SELECT id, data FROM order...
asked by 05.04.2018 / 20:55
1
answer

Percentage in SQL

I have the following query code: SELECT AC.DT_AGENDA AS DATA, ME.DS_MULTI_EMPRESA AS EMPRESA, AC.CD_UNIDADE_ATENDIMENTO AS CD_UNID_ATENDIMENTO, UA.DS_UNIDADE_ATENDIMENTO AS UNIDADE_ATENDIMENTO, COUNT...
asked by 26.04.2018 / 21:20