Questions tagged as 'mysql'

0
answers

Mysql Procedure query error

Why only stmt2 does not work? DELIMITER $$ CREATE PROCEDURE abc_produtos_total_geral( OUT v_total_geral decimal(14,2), IN v_dt_inicial date, IN v_dt_final date, IN v_table_name varchar(40), OUT v_nome_produto varchar(200)) BEGIN s...
asked by 12.11.2017 / 14:08
2
answers

Conditions in SQL

Hello, I have a question in SQL. In the company's system there are several products registered, and these products have different sales unit, ie some are sold by Package, Box, Unit and etc ... Every product is sold for UNIT = 1, but there are pr...
asked by 13.12.2017 / 00:52
1
answer

How to do "When selecting an option in dropdwn, it loads other database data into a Textarea" in php, mysql and Jquery

I have a form that has a select name="nome_cliente" field that retrieves all registered clients from the mysql database. In this same form I have several inputs that will be registered to that selected client, and have a textarea na...
asked by 05.12.2017 / 12:50
0
answers

Creating Event in MYSQL to delete records per day

I'm trying to create an automatic event in MySQL so that every 24 hours it runs the following command to delete promotions without the administrator interaction, where if the end date is less than the current date it will delete, I'm not sure if...
asked by 24.11.2017 / 02:37
0
answers

Insert error with array

Every time I try to insert more than one record that comes from an array it returns me the error 1452 after it inserts once. foreach ($this->idProdutoItem as $item => $value) { foreach ($value as $key => $result){ $sql = "...
asked by 23.11.2017 / 18:51
0
answers

Error trying to import database into phpmyadmin

I'm migrating a wordpress site from one server to another. I created a new MySQL database on the new server, but when I click on "import" I get this message. How to solve?     
asked by 08.12.2017 / 17:47
1
answer

Error trying to insert data into Mysql database [duplicate]

I'm trying to insert data from a promotion into the MySQL database via a REST Web Service in Java, but when trying to insert me returns the following error: Grave: ERRO ao Inserir Promocao - com.mysql.jdbc.exceptions.jdbc4.MySQLIntegri...
asked by 10.11.2017 / 03:36
0
answers

Search MYSQL with PHP and JSON

I have a table in the mysql database that has a genre field with this value: [{"id": 2, "genre_name": "action"}, {"id": 1, "genre_name": "comedy"}] and would like to display all rows containing genre_name with the value...
asked by 17.11.2017 / 18:40
1
answer

How to insert values inside a select when inserting it into the database

I need to insert data into the database, I'm getting the data from an old database, I had some attributes that have a certain value, I created those attributes in the site so that I can receive the data without any problem, the attributes that a...
asked by 09.11.2017 / 16:46
2
answers

Check empty fields with foreach

I have a form system where fields are generated by the base date through select. The same is done with foreach, how can I fetch the base date from the required fields and see if they were filled in? And if they are not do not validate the form a...
asked by 08.11.2017 / 12:20