Questions tagged as 'mysql'

0
answers

1452 Can not add or update child row: a foreign key constraint fails

SQL Query:    INSERT INTO tributos_prod (code, ncm, description, price, quantity,   v_total, situacao_trib_icms, t_tar_icms, aliquota_icms,   credito_icms, situacao_trib_pis, base_pis_value, aliquota_pis,   value_pis, situation_trib_cofins, v...
asked by 02.08.2017 / 22:39
1
answer

Error in procedure

I created this procedure to test if there is a field in a database, if it does not exist, the procedure would create. DELIMITER || CREATE PROCEDURE sp_verificarLinhas(IN colunas VARCHAR(50)) BEGIN IF NOT EXIST...
asked by 01.08.2017 / 21:00
0
answers

I can not start MySQL in EasyPHP

Whenever I use EasyPHP, I can not start a MySQL server with Apache starting normally. What can I do?     
asked by 15.08.2017 / 18:28
1
answer

How to handle calendar in the database

Hello, I'm doing a personal project, to practice programming and I came across a situation that I'm having trouble solving. A user has a routine that is repeated weekly, where each day of the week he has different free time, for example: M...
asked by 12.08.2017 / 13:45
0
answers

PHP get the value of a select and input whenever they are changed and query MYSQL

I have an input field that is a date that changes according to the date chosen in the calendar and 2 selects that are start and end times: <input type="text" value="13-08-2017" name="pickdate"> <select id="inicio"> <option valu...
asked by 03.08.2017 / 17:21
2
answers

[Solved] Assign label value when selecting product in combobox

Good morning, I have this form where in the comboboxes the desired values already appear: [1] [1] Now I have a problem, because when I select the product, I want the unit of the product to automatically appear on the label "Unit." This...
asked by 08.08.2017 / 11:37
2
answers

Change timestamp field mysql via php

I have the following database: CREATE TABLE Perdidos' ( 'idPerdidos' INT UNSIGNED NOT NULL AUTO_INCREMENT, 'dataEncontrado' TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, 'descricao' VARCHAR(45) NOT NULL DEFAULT 'Sem descrição', 'quemEn...
asked by 28.07.2017 / 16:01
3
answers

No select error using mysqli_query

I've done a php to list the rooms, but I'm having difficulty listing them, if anyone can help me, I would appreciate it. <?php $link = mysqli_connect("localhost","root","","hotel"); $result = mysqli_query("SELECT descricao FROM quartos WHER...
asked by 08.06.2015 / 21:53
0
answers

Sum of time worked by several employees

I have a collaborators table, and 2 other activity tables, each with a time column used to perform that activity and would like to add these tables to know the total time, for example, employee A did 10 hours on a project (table 1) and another 1...
asked by 10.08.2017 / 23:26
1
answer

Map tables to save access history

I have an application, which I need to save at least once a day, the date and time that the user accessed the application / system. Because we charge at the end of the month for the number of days that the app / software used. What is the bes...
asked by 30.07.2017 / 18:16