Questions tagged as 'mysql'

3
answers

Unsigned in the primary key increases my chances?

I was setting up a bank for a personal project and I came across creating a table to save a few values, this would use a TINYINT as the primary key, since I assume that I will not exceed 100 records, but if I happen I want to have a ceili...
asked by 21.02.2017 / 17:27
3
answers

How to group mysql results by foreign keys into a single array through a single query?

Let's say I have 2 tables, one with phone numbers, and one with sectors: Ex :. tb_ramais: id, extension, group_id (fk). id | ramal | grupo_id 01 | 1234 | 01 02 | 2345 | 01 03 | 3456 | 02 04 | 3457 | 02 tb_groups: id, sector, manager....
asked by 19.05.2014 / 19:55
2
answers

Database modeling

I created the following model: Would you like to know what can be improved? taking into consideration good practices for database? Explanation: In% of%, a person will create a login, which can be of type TBLogin or Pes...
asked by 25.09.2015 / 17:41
2
answers

How to put 2 select in mysql

I have 2 select which are basically identical, changing only 1 table. I'm trying to put the 2 in a single select, but I'm not getting it. Follow the select: SELECT DISTINCT a.id, a.unidade, a.posicao,...
asked by 03.02.2017 / 17:37
1
answer

What mysql.sys?

Good Night Personal, I just installed wampserver, later I was able to access phpmyadmin, but I found something strange in user accounts. As users only had mysql.sys and root, being the root that I created. Can anyone tell me about this?...
asked by 28.01.2017 / 23:04
1
answer

How to comment / document a table?

I saw in a PostGreSQL database that each table and each table field has a comment explaining what each one is for. Follow the template below: I want to know if in MySQL it is possible to do something similar. If not, is there any extern...
asked by 20.02.2017 / 00:07
4
answers

Search between dates

I need to search my MySQL for some registered employees. I have the dt_nation field and I need, for example, to look for employees who are between 20 and 30 years old, how can I do that? With this code snippet I get the dates, but unfortunate...
asked by 21.05.2014 / 19:49
2
answers

Time between (between) "start time" and "end time"

I'm having problems catching the current time, in case I'm using CURTIME () , I need to fetch the results that the current time is between the time value of the start time and final time , I tried the following ways, however, without success...
asked by 12.09.2014 / 04:45
2
answers

Insert data into the database using mysqli

How do I insert this data into the database using mysqli : print $data->access_token."<br />"; print $data->username."<br />"; print $data->full_name."<br />"; print $data->id."<br />"; ... $conexao...
asked by 05.05.2014 / 08:23
2
answers

Error creating a MySQL table

I created a table in Power Designer as shown below create table BANCO ( COD_BANCO integer not null auto_increment, NOME_BANCO varchar(50), AGENCIA_BANCO integer, CONTA_BANCO integer, GERENTE_...
asked by 08.06.2014 / 16:50