Questions tagged as 'mysql'

2
answers

Rank database [# 1 of 10]

I need to rank DB records during pagination. At first I do not intend to create a field for ranking. Assuming you have 10 records 1) Ordenando a paginação por AZ, quero listar com o número correspondente ao rank - #N de 10 Lorem i...
asked by 16.08.2014 / 09:09
2
answers

Best / Safe way to transfer sensitive data to an android application via JSON

I am trying to develop an application for android that will work with a database in this case MySQL and I was thinking of doing communication between the database and the application via JSON the data would have to be transferred over SSL but ev...
asked by 10.07.2014 / 18:08
2
answers

How do I not insert repeated records?

I am doing a login system in which each user creates a URL that sends to the bank, but I need to make it not repeat information, if there is already information in the database, it returns (URL indisponível) result. p> INPUT COD...
asked by 01.07.2014 / 01:55
1
answer

How does auto increment work with composite keys in the MyISAM engine?

I ended up getting a table to manipulate, I noticed that sometimes the value of auto increment was repeated, the first thing that called me to Attention was that the primary key was composed of two fields, one of which was AI and the other not....
asked by 18.02.2016 / 17:11
2
answers

Condition in join or in where?

Is there a difference if I use: select * from a left join b on a.id = b.id and b.id2=1 where ... or select * from a left join b on a.id = b.id where b.id2=1 Sent on: Fri ? The first SQL returned me super fast, the second one did...
asked by 30.08.2016 / 13:52
2
answers

SQL LIKE is Case Sensitive?

When I had this doubt, I did not find quick results in Portuguese that offered a response (most of the results are in StackOverflow in English). It would be interesting to have an objective answer here in Portuguese to help the community....
asked by 23.03.2017 / 16:46
1
answer

Create View in MySQL through Laravel

How can I create a view in the MySQL database through migrations of Laravel? I did not find anything in the documentation.     
asked by 26.09.2016 / 19:35
2
answers

Brazilian Time Zone in MySQL

I have a MySQL database table named registros . In it, I have the following structure: id_registro , nome_registro , data_registro . In data_registro I'm using current_timestamp (), fetching the time from th...
asked by 08.09.2016 / 17:02
1
answer

Query to find if value is between "1 | 3"

I have a unit table that represents the number of bedrooms of the building: id| dorm 1 | 1|3 In this case above it means that the property id 1 has units with 1 or 3 bedrooms. Then I have a search using $_GET where the dorm fie...
asked by 10.05.2018 / 16:29
2
answers

Is the following database modeling in my head?

I created this modeling (just an idea), so that it does not have null / white fields. I have not completely revised it. There may be fields that would be blank. The matrix table was Entities and through the needs of there being no blank field...
asked by 30.06.2016 / 20:42