Questions tagged as 'mysql'

1
answer

Create trigger between tables

I'm doing a job here and I came across a problem, our system is a home automation system using java and mysql . We created two tables for logs , the first one saving the device, user and the exact date that was turned on or...
asked by 15.07.2017 / 16:11
1
answer

Group employees by company in query

I'm making a report, where I need to follow the following layout: Withthequerybelow,youhavecreatedmorerows,ratherthangroupingemployeesbycompany:selecte.cnpjascnpj,e.nome_completoasempresa,li.codassolicitacao,''funcionariosfromliberacoesli,em...
asked by 15.07.2017 / 19:22
0
answers

Inner Join in 5 tables

I have the tables: reparableis projects contracts contracted_items control_contracts I made this Query: Select a.qtd as quantidade_contratada, b.pn, c.numero_contrato, count(d.id_pn) qtd_executada, (a.qtd - c...
asked by 14.07.2017 / 15:35
1
answer

Use two or more times While for the same Select?

I'm putting together a listing page and product output register and I'm having trouble pulling the information and doing the while a second time. Example: $sql_for = mysql_query ("SELECT * FROM cliente ORDER BY cli_nome ASC"); $sql_for2 =...
asked by 14.07.2017 / 00:14
1
answer

My SQL always adds 24 clicks to each access instead of 1

I have a script that counts the visits on my web pages and stores mysql, however, it is adding 24 clicks to each access, instead of 1 . What's wrong with this code? See the script: <?php $idcategoria = 19; if (!empty...
asked by 25.07.2017 / 19:45
1
answer

Perform trigger condition

I have a trigger that does an update on my table. I would like to know how to do so that the trigger is only executed if the status column is different from what is already in my table, if it does not, nothing happens. DELIMITER $$ CREATE TRIG...
asked by 13.07.2017 / 20:22
0
answers

Error saving MySQL PHP form information

What's happening: I have a system that, when I finish filling out the form and save, does not save the changes appearing a alert of "saved without changes" and returning to the previous page. What should happen: When you try...
asked by 25.07.2017 / 14:13
0
answers

How to catch events from a drag and move to php

I have this project below. In it I have a list of images where I can drag and soda as you need. So far it's working properly the way I need it. I need to consider the position of the images as an order, example: img1 = posição 1 img2 = posi...
asked by 05.08.2017 / 18:38
3
answers

Registering form in the database

<body> <?php $titulo = $_POST['titulo2']; $cap = $_POST['capitulo2']; $opt = $_POST['opcoes']; $conexao = mysqli_connect("localhost","root","","report"); $sql2 = "insert i...
asked by 12.07.2017 / 23:14
0
answers

Date field register date

I have a table that one of the fields is type date. In my insert.asp page when I type the date for example so 10/07/2017 or 2017-07-12 does not save in the MySQL database. The error that is shown is this:    Error: [MySQL] [ODBC 3.51 Drive...
asked by 12.07.2017 / 16:21