Questions tagged as 'mysql'

1
answer

Update in the stock table

I have three tables: 1- RegEntradaNutricia with the following fields: InputDate, SupplyDocument, ProductDescription, Quantity, Price 2- RegSaidaNutricia with the following fields: DataSaida, ProductDescription, Quantity. 3- StockN...
asked by 29.12.2017 / 19:00
1
answer

How to cancel an INSERT trigger event?

Hello, I created a trigger that every time the user makes a sale is debited the amount of items, but if I do not take care the amount can be negative because the user can sell more than he has in the database. So I need a trigger that does not I...
asked by 01.01.2018 / 17:58
1
answer

What's wrong with this MySQL CREATE FUNCTION?

What is wrong with this create function? I can not figure it out. Already the error in the first line. CREATE FUNCTION SEQ_NEXT_VAL() RETURNS INT DETERMINISTIC BEGIN DECLARE retorno INT; SELECT MAX(IDE_ERROR) INTO retorno FROM ERROR_LOG...
asked by 01.12.2017 / 16:56
1
answer

Triggers - I need help solving the question below

I have the following situation: Thetablesdescribedabovearerespectivelyger_usuario,ger_mensagemandger_destinos.Thefieldproprietario(ger_mensagem)isaFOREIGNKEYreferringtotheger_usuariotable.Thefieldid_destino(ger_mensagem)isaFOREIGNKEYreferr...
asked by 02.12.2017 / 04:16
0
answers

Codeigniter3 / Mysql - Select List

Good morning, people. I'm working on a code using Codeigniter, which has a registration form. This form has three Dropdown (State, City and Neighborhood), and the data is returned from the bank, according to the selection, ie if I select the...
asked by 27.11.2017 / 12:32
0
answers

how to connect VM with mysql in another VM with PHP / Apache?

Good evening, people. I am developing a system in php / mysql to improve my knowledge in the area. Knowing this, I now need to simulate a server by doing the following steps: 1 ° Create three virtual machines (with ubuntu OS in the virtual bo...
asked by 09.12.2017 / 22:44
1
answer

How to save numeric type in Mysql

Hello, I am using to save the price of a product in MYSQL numeric type (9,2) but on my system I am using Double and when printing it appears $ 2.2 instead of $ 2.20 what kind of data could use it to get all the decimal places? // my Product cl...
asked by 14.11.2017 / 00:40
1
answer

filter with 4 fields coming via GET in php?

I'm having trouble creating a filter with more than four fields in a normal example where I filter the user's gender so my Query is <?php try { $pdo = new PDO("mysql:dbname=projeto_filtrotabela;host=localhost", "root", "root"); } ca...
asked by 14.11.2017 / 00:54
1
answer

Convert table data to UTF8

In my table there are characters in Japanese, Korean and Chinese, but they are not converted, when I echo with php, so it shows ?????? , In my doubt would be, how can I convert the DATA of this table? the table is already in utf8_...
asked by 16.11.2017 / 15:48
1
answer

Error in class PHPMalier

I would like your help! Have the following class to send emails in php: <?php // Import PHPMailer classes into the global namespace // These must be at the top of your script, not inside a function use PHPMailer\PHPMailer\PHPMailer; use PHP...
asked by 12.11.2017 / 19:54