Questions tagged as 'mysql'

2
answers

Problems displaying duration in hours and minutes in PHP

I am trying to calculate a duration between values of a column in my database. The value until it is being calculated correctly, but it turns out that the hour: minute format is not going as expected. Assuming that in my database I have the f...
asked by 10.05.2017 / 22:38
1
answer

Error creating php mysql line graph

I'm trying to make a line chart with php and mysql like this: jsfiddle based on that tutorial . My graph only returns empty with undefined columns: The idea is to make a graph where it contains 1 line per technician. Follow the fil...
asked by 11.05.2017 / 01:10
1
answer

Return average cost between partially equal products

As I exemplify in SQL Fiddle , I need to give the tables the data to be returned as follows: / p> nome | descricao| tipo | custo| ult_lancamento | entradas | saidas ---------------------------------------------------------------...
asked by 16.05.2017 / 01:27
1
answer

MySQL, use sum quantity (total) 10 in WHERE

I have the following MYSQL query: SELECT SUM(A.val) AS totalvendas, B.cod AS codigo, B.nom AS Nome, B.reg AS regiao FROM venda AS A LEFT JOIN vendedor AS B ON A.ven = B.cod WHERE reg = "norte" GROUP BY A.ven ORDER BY totalvendas DESC; It...
asked by 19.05.2017 / 06:21
2
answers

Incorrect syntax error next to engine

I would like you to help me. The following error is appearing:    MESSAGE 102, LEVEL 15, STATUS 1, LINE 17-SINTAX INCORRECT NEXT TO% with% But I did not find it. CREATE TABLE SITE ( SITE_ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,...
asked by 19.05.2017 / 07:39
2
answers

Bank data for days of the week

I was thinking here and could not figure out the way this would work. Let's suppose I have 1 database with 10 posts and in a column had "Day of the week" ID | NOME | DIA DA SEMANA ------------------------- 1 | ALAN | SEGUNDA-FEIRA 2 | ALE...
asked by 19.05.2017 / 22:50
1
answer

Error with Mysql insert with JDBC

I'm running this code: /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package br.com.caelum.jdbc; import...
asked by 12.04.2017 / 21:20
1
answer

Register changes in MySQL

I need to register all changes to the database , such as UPDATE , INSERT and etc, so that I can restore the last backup and > run the queries from the last backup , manually deleting the unwanted queries. I read about the My...
asked by 12.04.2017 / 04:14
1
answer

The publications are getting on the last page in the PHP MYSQLI

Good evening. Does anyone help me in a problem I'm having? Well ... I did a paging system, but when I add more data in the database, the new data stays on the last page instead of the first one, does anyone know how to revert it? <?php...
asked by 19.04.2017 / 03:26
1
answer

Separate data in table

I'd like to make a separate table for "seasons". Example: Tabela estatisticas: Temporada 1: ID | JOGADOR | PTS | AST | 0 | Leonard | 12 | 7 | 1 | Pedro | 10 | 5 | Temporada 2: ID | JOGADOR | PTS | AST | 0 | L...
asked by 10.06.2017 / 23:23