Questions tagged as 'sql'

2
answers

Take the count of a ranking

I have a movie ranking system on my site and I need it NOT to show how many users have recommended such a movie, here's my code: $query = "SELECT DISTINCT filmes, count(filmes) FROM filmes_rec GROUP by filmes ORDER by co...
asked by 14.10.2016 / 03:56
3
answers

Login problem with password in MD5

Login Form: <form id="1" name="1" action="pass.php" method="post"> <div class="login"> <input placeholder="Usuário" type="text" id="username" size="25" name="name" /><br> <input placeholder="Senha" id="pas...
asked by 14.10.2016 / 02:59
0
answers

Liquibase .sql file not found

When I run liquibase it does not find .slq files configured by the tag. SQLFile. How do you solve this? Problem data: Use in the project Liquibase 3.4.2. Configure the maven plugin Run script in Maven Ok everything works (Windows +...
asked by 03.11.2016 / 16:48
0
answers

How to get the largest value with the longest length in mysql in order by desc?

I have a sequence of values, for example: w1-16 w2-16 w3-16 w4-16 w5-16 w6-16 w7-16 w8-16 w9-16 w10-16 w11-16 There you go. I made a query that takes the correct sequence as above. Example: select week from tabela where group by week...
asked by 09.11.2016 / 13:49
2
answers

Encrypted password verification

I'm having a hard time checking the login with Delphi with encrypted password in the MySQL database, I can do the registration and encrypt the password in the database through Delphi with the StoredProcedure that I cr...
asked by 05.11.2016 / 00:43
0
answers

Select prioritized and sorted by field

Well,IhaveaschedulescheduleandIneedtodisplaythespeakerthatisliveatthemoment,I'mpickingupviaphpthedatesandplayingintheselect,butseveraltimesitleavesormessesuporitdoesnotworkout,I'lltrytosummarizewhatIhaveinordertofacilitate.Rememberthatyoucanhav...
asked by 04.10.2016 / 17:05
0
answers

SQL - AVG with alias and vendor collation

I need to create a query that calculates the average of a vendor "score". Here is the query, and then the explanation of the fields: SELECT distinct C7_FILIAL, CASE WHEN C7_FILIAL = '0201' THEN '0201 - METAIS' WHEN C7_FILIAL = '...
asked by 07.11.2016 / 18:44
1
answer

Select with cast (numeric as decimal) works, but view creation does not

Good morning everyone! I currently work with postgresql and I'm doing a database migration, and I need to create a view of my old database tables. Well, I need the number columns to round with 15.3 but I'm finding a problem that I can not fig...
asked by 22.09.2016 / 15:24
2
answers

Order the highest per order

Good evening, I'm using the following command: select cliente_id, desconto, pedidos_detalhes.pedido_id, cliente_tipo from pedidos_detalhes inner join pedidos on pedidos_detalhes.pedido_id = pedidos.pedido_id; The res...
asked by 21.09.2016 / 01:30
0
answers

Modify batch HTML code in * .sql file

I have a file in * .sql. I needed to batch convert HTML codes with links like this below: <img src="http://www.sintaema.org.br/site/wp-content/uploads/bomba-456-copy_832-1-pdf-724x1024.jpg"alt="bomba 456 copy_832 1" />' To look like t...
asked by 20.09.2016 / 23:49