Questions tagged as 'mysql'

1
answer

Error executing the PASSWORD function in MYSQL SERVER (SQL SYNTAX ERROR 1064)

Error executing the PASSWORD function in MYSQL SERVE I have the following query: SELECT * FROM users WHERE login = 'FABIO' AND pwd = PASSWORD('2018') LIMIT 0, 50000 You're giving this error:    Error Code: 1064. You have...
asked by 13.09.2018 / 15:39
1
answer

I am trying to create a Trigger in MySql but it is giving syntax error

CREATE TRIGGER comissao ON tb_Pedido FOR INSERT, UPDATE, DELETE AS BEGIN DECLARE v_codFuncionario INT DEFAULT NULL; DECLARE v_dataPedido DATETIME(3) DEFAULT NULL; DECLARE v_valorComissao DECIMAL(15,4) DEFAULT NULL IF(SELECT COUNT(*) FROM INSERTE...
asked by 12.06.2018 / 20:39
1
answer

get input variable data

Speak People! I have a system that registers products and creates what I need in the data field, however in a crucial part, after I create the fields I need it generates input with these fields! The problem is: When I send via post the input...
asked by 03.06.2018 / 20:21
1
answer

mysql error: each derived table must have its own alias

I am trying to join two tables questionario and resposta and select from the table questionario two dates, this was the code I tried in php: $verificar=mysqli_query($link,"SELECT questionario.*, resposta.* from questionari...
asked by 08.06.2018 / 17:09
1
answer

I would like to know how I can do a select with all the Fridays of the year in mysql for example

I'm developing a calendar, and it's going to be used to book meetings. There are sectors, such as the T.I sector, for example, that have a meeting every Friday from 9:30 to 11:30, all year round. I need some way, to insert into my "start date" t...
asked by 09.06.2018 / 17:40
1
answer

How to set the Mysql Time Zone?

I took an old project in github, and the project was about a JSF application that was using the old mysql artifact as you can see below; <dependency> <groupId>mysql</groupId> <artifactId>mysql-co...
asked by 01.05.2018 / 10:56
2
answers

Show the three best evaluated vehicles in a table

I'm doing a site for the course, but I have a problem. I opted to use two tables, one for the "ratings", and another for the "vehicles". I would then like to select the 3 most valued vehicles from the table, and show it on the main page. Rati...
asked by 01.05.2018 / 02:40
1
answer

ORDER BY or LIMIT. What is first processed in SQL Select?

Friends, what is first processed in SQL Select? The "Order by" or "Limit"? For example, if I have a table with multi-state cities. Then I look for cities with more than 100 thousand inhabitants of state X, resulting in 6 cities (eg cities lis...
asked by 07.06.2018 / 09:27
1
answer

Select Mysql with an array in a table

I have a table in the bank called actuation, in which generated the ID's of the areas chosen by the user ex: 1,5,4,9,15 I need the result of the query in Mysql to return all the users that have been selected in a checkbox list Can someone...
asked by 29.04.2018 / 17:16
1
answer

Update does not find what was typed in the inputs

I have a system where you can change the information of a record through an editing form, but this edition is not being saved. HTML <?php $lnk = mysqli_connect('localhost','root','') or die(mysql_error());...
asked by 25.05.2018 / 15:36