Questions tagged as 'mysql'

1
answer

Editable line with PHP and Javascript

I'm trying to create an editable line, so when I click on it, Js brings me the inputs, allowing me to make the changes on that line and perform the Update in the database. As in this image, that prinlt of Trello. Note that it's a line, but...
asked by 29.09.2016 / 20:17
1
answer

Self-relationship in mysql

I am trying to implement a table in MYSQL with self-relationship, it is a staff registry table, in which the administrator (FA) registers the common employee (FC) It would be registered in the tuple of the FC which FA registered it, I created th...
asked by 26.09.2016 / 01:51
2
answers

Javascript connection to the bank does not work

Hello, I'm trying to connect to the MySQL database with a Phonegap / Cordova project and I'm trying to troubleshoot. First I created the Cordova project and the only change I made was to import JQuery. So I followed a tutorial to make an ajax ca...
asked by 27.09.2016 / 15:46
1
answer

Enter data in the Mysql database received from a Json

I have the following problem, I have an app and by it send some data in the format Json, for the server, up to that blz, arrives in this good format: {"credenciador":"","evento":"16","inscrito":[{"id_inscrito":"13","data_credenciado":"2016-0...
asked by 26.09.2016 / 20:53
1
answer

Use database data mysql and php

This code works correctly with the fixed dates. How do I use the dates that are registered in the mysql database? if (!empty($_REQUEST['year']) && !empty($_REQUEST['month'])) { $dates = array( array( 'date' => '2016-09-1...
asked by 21.09.2016 / 16:37
1
answer

How to add current record to previous record, creating a cumulative?

How to add current record to previous record, creating a cumulative? SELECT DAY(i.imp_data) AS DATA, m.mt_valor / m.mt_valor / CAST(DAY(LAST_DAY(NOW())) AS DECIMAL)* 100 AS META_DIARIA, SUM(i.imp_venda) / m.mt_valor *...
asked by 21.09.2016 / 22:37
1
answer

Procedure - MySQL error code: # 1064

CREATE DEFINER='root'@'localhost' PROCEDURE 'teste'(IN 'pId' VARCHAR(20))NO SQL INSERT INTO gpetnaold.pessoal SELECT * FROM gpetna.pessoal WHERE gpetna.pessoal.id=pId; INSERT INTO gpetnaold.contato SELECT * FROM gpetna.contato WHERE gpetna.con...
asked by 22.09.2016 / 17:08
4
answers

Redeem name and show in option through id

I have a id of the table, example: user with id = 1 , how can I get the name of this user using id of it and show on input ? I did so: while ($dados = mysql_fetch_array ($sql)) {?> <option value="<?...
asked by 03.10.2016 / 13:49
1
answer

Insert range of numbers into a table automatically SQL

The question is the following I want to insert in a field of a table a range of numbers that goes from 100 to 1 000 000 000 and did not want to be doing 1 to 1. How can I do this automatically? In SQL Server     
asked by 03.10.2016 / 13:15
2
answers

Last update table MySQL

Good morning. I have a procedure that runs daily deleting the data of a table with daily data of the clients of my system and for data availability reasons, sometimes this procedure is executed sooner or later. I would like to know if ther...
asked by 06.09.2016 / 16:31