Questions tagged as 'mysql'

1
answer

How to not repeat the same input request

I need to create a page where I can choose a PLAN (or more) and a PLOT for each chosen plane. At the moment, when I make the foreground choice, it is interfering with the options available for the background choice, and this is not the desired b...
asked by 28.01.2017 / 20:38
1
answer

MySQL in Java Desktop applications for various stores [closed]

Hello, if I make a Java Desktop application with MySQL database, which will be delivered to several establishments to use, how is the database? Do you have any suggestions? The application, I can get it to be installed easily, but what about the...
asked by 28.01.2017 / 19:48
1
answer

Find smaller integer available in MySQL

I would like to know if it is possible to create a query that returns the smallest integer available. It's a bit complicated to explain, but with an example it makes it easy: id | codigo ---|------- 1 | 1 2 | 2 3 | 4 4 | 5 5 | 6 In t...
asked by 26.05.2017 / 19:19
2
answers

How to send form data via _SESSION?

How can I send data from the first form to the second one and then send it to mysql? I've tried everything and when I send it to the database, the second data arrives. I'll put down my forms and mysql. I'm grateful right away. Form 1...
asked by 30.01.2017 / 20:38
1
answer

Performance when querying the database

Suppose I have a table with 100,000 records, which in this example I will call the dictionary, and will have a LIMIT of 1000 results. SELECT FROM * dicionario Let's say hypothetically I've already done a query and in this query I go...
asked by 31.01.2017 / 04:17
1
answer

Select deleted a record and searching for others with the same code [closed]

The product code I pass into the sql via php. For example $ cd_product = 2; I would like to list everything but the record for this product (cd_product! = 2). So far so good. But I would just like the records of the table (product_table...
asked by 27.01.2017 / 17:24
2
answers

How to get the POST value and save it to the bank

View image: ImageoftheBank Code$nome_plano=trim($_POST["nome_plano"]); $quemcadastrou = $userRow['nome_funcionario']; try { $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password); $conn->setAt...
asked by 27.01.2017 / 21:04
1
answer

Error in adding foreign key

I'm having trouble creating a foreign key. I am doing the project in MySQL Workbench. The generated SQL script is as follows: DROP TABLE IF EXISTS 'comercio'.'cliente' ; CREATE TABLE IF NOT EXISTS 'comercio'.'cliente' ( 'cliente_id' INT(1...
asked by 26.01.2017 / 01:17
1
answer

How to get the auto increment ID using MySQL and PHP and use it later? [duplicate]

I'm creating an API in PHP and insertion. I need to get the ID created in this INSERT and use it later. What I find of material seems not to be recommended. Any solution? Thank you. My PHP: <?php header('Access-Control-Allow-Origi...
asked by 25.01.2017 / 13:34
1
answer

Doubt in consultation with EntityFramework

How do I make this query with EntityFramework ? with lambda or linq SELECT t0051_id_medicamento, t0100_lote, SUM(t0100_qtde) FROM t0100_historico GROUP BY t0051_id_medicamento, t0100_lote;     
asked by 26.01.2017 / 23:36