Questions tagged as 'mysql'

1
answer

ERROR Parse error: syntax error, unexpected ''

this error is appearing in my code: Parse error: syntax error, unexpected '<' in /home/storage/3/da/ca/public_html/ViewRevisao.php on line 110 What would be the solution in this case <?phpinclude_once("conexao.php"); $...
asked by 26.05.2018 / 17:24
1
answer

PostgreSQL: Catching bugs and hits

I need a query to get the number of errors and hits from this table.     
asked by 15.05.2018 / 21:41
1
answer

How do I change the MYSQL database when a 1 month registration date expires

I have a register of VIP users that make a payment that the registration lasts 1 month. When the payment is made, the status column of the users_vip table is updated to 1 id|iduser|datapedido|dataconfirm|datafinal |status 1 | 720 |2018-05-...
asked by 03.05.2018 / 15:39
2
answers

Insert in the value of an input type="date" the date returned from the Select of the database

I'm getting a date from the database and displaying it in a input field in HTML. However, for the client to be able to edit as a date, I need it to be in an input type="date". However, there seems to be some HTML5 restriction on this type of...
asked by 09.05.2018 / 01:11
1
answer

Select with condition

I have the following sample table (tbl_Local) in MySQL: ID| LOCAL| COR 1 | A |RED 2 | A |RED 3 | B |RED 4 | B |BLACK 5 | B |WHITE 6 | C |RED 7 | D |BLUE 8 | E |BLUE 9 | E |ORANGE 10| E |YELLOW 11| E |RED 12| F...
asked by 03.05.2018 / 21:22
2
answers

Error: Notice: Undefined index || PHP || MYSQL ||

Hello, I'm developing a filter for an online store and I'm getting this error when I start the page, ButwhenIclickthecontinuebuttonontheform,allexceptthisonedisappear: Hereistheformcode: <div class="card-body"> <form method="pos...
asked by 11.05.2018 / 11:38
1
answer

Return the number of dates in Mysql

I have the table containing the date field. | Data| | 2016-06-09 | | 2016-06-09 | | 2016-06-09 | | 2016-06-08 | | 2016-06-08 | | 2016-06-05 | | 2016-06-01 | I want it to return something like this: | Data | Quantidade | | 20...
asked by 08.02.2018 / 13:27
1
answer

How to join two tables in a JSON

I have two tables: Companies id: integer nome: string Images id: intger idEmpresa: integer url: string I do: select * from empresas where id = 1 select * from imagens where idempresa = 1 and it generates a...
asked by 01.02.2018 / 21:45
2
answers

Foreign key for different tables (MySql)

At the time of executing the error query stating that it is not possible to create the foreign keys, I looked in the documentation and did not understand whether this code is possible or not. create table autor( cod_autor integer, nome...
asked by 21.08.2018 / 05:24
2
answers

Set query sql according to available discipline

I have this query, working fine, but it works only if I have data for the two disciplines PORTUGUESE and MATHEMATICS, how can I do that, without harming the result, regardless of whether there are only one or both disciplines I can get the resul...
asked by 27.08.2018 / 14:49