Questions tagged as 'select'

1
answer

Release Input when you click Select

Hello, I have a question in my code. I need to click on a Select to display fields for entries. For example: <form role="form" class="form-horizontal"> <div class="form-group"> &l...
asked by 30.08.2016 / 03:52
1
answer

Error selecting multiple data in php login

I have a simple script that allows a user of my site to view their data on a page, for example: name, email, age, image. See the script below: <html> <head> <title> Login de Usuário </title> </head> <body...
asked by 16.06.2015 / 19:52
1
answer

SQLite - count the primary keys that were not referenced as foreign keys

First, I am trying to count the primary keys of a table that were NOT referenced as foreign keys in another table. In addition, I want to filter the search by using the LIKE clause to display only those containing a certain letter of a give...
asked by 02.04.2014 / 22:30
1
answer

Help! How does this select work?

Help me understand how this works please. It turns out that I'm starting the SQL studies and hackerhank has an exercise that needed this code: SELECT DISTINCT CITY FROM STATION WHERE REGEXP_LIKE(LOWER(CITY), '^[aeiou]') ; After a...
asked by 17.05.2018 / 16:02
1
answer

Select columns in different tables

I'm using Laravel 5.3 and would like to use columns from two different tables related to foreign key: For example:    Client table id | nome | end_cep 1 | carlos | 69084555 2 | Maria | 69088555    Address table cep...
asked by 26.10.2017 / 15:34
1
answer

DataSet does not recognize LIKE and search parameters

Good evening. I have a table in the MySql database and I am using a DataSet to handle it in my Windows Form project. The problem is that when I try to use a query with LIKE, it does not recognize the parameter I'm requesting. SELECT nome FROM...
asked by 30.05.2017 / 01:02
3
answers

Group date periods

I need to do a query that returns all records grouped in certain periods. The table contains a date type and should produce output similar to this: | Hora | Quantidade | ------------------------- 01 | 08:00 | 30 | 02 | 08:05 | 28...
asked by 10.11.2016 / 13:38
2
answers

Select inverting row and column

I have a table like this: codigo ano quant 100 2014 15 100 2015 13 100 2016 20 101 2015 15 102 2016 22 102 2014 05 I want to create a query that lists the code like this: codigo 2014 2015 2016 1...
asked by 04.11.2016 / 15:36
1
answer

MySQL select random with priorities

I have the following scenario, I have a table and I need to make a select with an order by RAND (). But I'd like to put some conditions for example: TABELA ID | NOME | IDADE | GRUPO    Data 1 | Hiago | 20 | 1 2 | Igor | 15| 1 3 | Ana| 18...
asked by 21.11.2015 / 02:02
1
answer

How to check the occurrence of a string in a line and get x characters to its left and y to the right?

I have a problem with a MySQL query and I'm looking for help. Suppose I have many rows in the PROCESS column and one of them looks like this: IBAMAPROCUR: DF00025372 ADRIANA MAIA VENTURINIAPDO: JOSE DOS I want to check if there are 25372 ch...
asked by 22.05.2015 / 15:11