Questions tagged as 'mysql'

1
answer

Error when updating table in MySQL

Well folks, I have the error below, when trying to update in a table in MySQL and I do not understand why, I am correctly searching the data in the form, but even then, it does not let me do the update, which I do? <?php $link = mysqli_con...
asked by 12.06.2015 / 22:25
2
answers

Completing form with AJAX and MySql

I need to complete a form, according to user demand, with information from the Database (MySql). Example: I have the fields "Institution", "Course" and "Period". For the user, firstly, only the "Institution" option will appear, once he has...
asked by 15.06.2015 / 19:35
1
answer

Change color pie chart php

Good afternoon! I'm creating a pie chart, the data I'm looking for from the database. But I do not know how to change the colors of the sectors of the pie chart, to make it clear I will show here what I want. Home The code is as follows:...
asked by 19.06.2018 / 14:18
2
answers

Select the first and last day of the previous month

I have the following query : select ADDDATE(LAST_DAY(SUBDATE(CURDATE(), INTERVAL 1 MONTH)), 1) primeiro_dia, last_day(sysdate()) ultimo_dia That returns me the first and last day of the current month according to the system date. How co...
asked by 04.06.2018 / 14:29
1
answer

Syntax error and I do not know where

I'm wanting to create a discount trigger for if the user selects the payment method 6 that is billet he has 15% discount in the amount that will be paid, then the ValuePagar q is where the value that the person will get is to receive the disc...
asked by 09.06.2018 / 22:15
1
answer

relate two tables listing only last php record

I have a template table as follows: | materia | provaID | matricula | questao | resposta | matematica 303 211834 quest1 A matematica 303 211834 quest2 C matematica 303 211834 quest3...
asked by 08.06.2018 / 02:32
1
answer

Selection with LEFT JOIN

I'm studying sql and I do not know if this is possible. But I have the following tables: Table contatos ______________________ id | nome | sobrenome | ______________________ That only contains one contact: 1 | andrei | coelho...
asked by 24.03.2018 / 22:44
1
answer

Convert everything to hours or everything in minutes in mysql

I have a table with the two Start and End fields of Tipo de dados Time . Example of records I have in the table: 09:30:00 10:00:00 10:00:00 11:00:00 11:00:00 12:00:00 As I show, I have full hours and half hours, as you can only...
asked by 29.03.2018 / 11:35
1
answer

Delete in 2 tables at the same time in a single query

I have the following query : DELETE FROM emails,emailsacompanhamento USING emails,emailsacompanhamento WHERE emails.idEmail = emailsacompanhamento.idEmail AND emails.idEmail = ".$idEmail That makes a kind of JOIN in tables and...
asked by 25.05.2018 / 21:16
3
answers

I am not able to register data in the database

I'm a beginner in Java and I have the following problem. In the status register screen, I have a country selectOneMenu, and two fields for name and acronym. When I save in the database I get the following error: Console: 2018-05-24 01:16...
asked by 24.05.2018 / 06:51