Questions tagged as 'mysql'

0
answers

How to update data from another table using a trigger

I'm trying to register a product in a cart, every time it is registered it means that it was bought, so whenever this happens I want to decrease the quantity in the stock, I tried with the trigger below, but it did not work: p> DELIMITER $$ CRE...
asked by 10.06.2018 / 00:36
1
answer

Multiple PHP uploads and insert into the mysql database multiple images

Maybe it's duplicated, but I could not find any explanation that follows in my reasoning. I have the following code taken from the Web, through a video lesson. <form class="form-horizontal" method="POST" action="administrativo/processa/a...
asked by 15.05.2018 / 17:11
0
answers

Download bank data in csv format

I am trying to download the database data in csv format but it indicates that the SQL syntax is wrong. public void exportarBaseRespostaPI() { String banco = "b2wentregascorreios"; String tabela = "baserespmanifest"; String caminho...
asked by 09.05.2018 / 18:03
1
answer

Pull data from a table for inputs on the same page

I need help pulling values that are within table . I made a code using table with $sql = "select * from equipamentos"; to pull the data that I implemented in the Mysql Bank, but specifically in the Equipment Table. I can use...
asked by 18.05.2018 / 22:32
1
answer

Save various data in Laravel

I have the following formula on my blade, and now I want to save the data for each row in my database. How to save this data in Laravel? for ($i = 0; $i < 12; $i++){ var minhaData = moment(DataVencimento).add($i, 'months');...
asked by 29.04.2018 / 22:29
0
answers

Improving modeling in an ordering system [closed]

I developed a food ordering system, but I have doubts about whether the way I modeled the database is the best in terms of performance and longevity (how the system was to behave with a large amount of data). > I have the following table struc...
asked by 29.04.2018 / 00:33
1
answer

Error when adding FK

I found only this type of error in "Select", I followed all the restrictions but it did not work! Error from line: 86 in command - alter table tb_consulta add constraint fk_tb_consulta_tb_tratamento foreign key (idtrat) references tb_pacien...
asked by 28.04.2018 / 19:47
1
answer

Adding 5 variables at a time! PHP / MYSQL

Hello, I'm having a problem under my conditions (if). Note that I am very novice in php / mysql, so that's the reason maybe my stuff is a mess, but you can understand it. <?php @mysql_connect("localhost", "root", "vertrigo") or die(mysql_er...
asked by 30.04.2018 / 00:15
0
answers

How to build a comic book viewer online? [closed]

Good evening everyone! I've always worked with frontend and very little with php and mysql, but I decided to make my personal comic book site. An image of my page: Each image is a material link in the database. By clicking the comics cor...
asked by 08.05.2018 / 03:13
1
answer

Sort Listing by parent mysql data item in php

I have a listing to do that will work as follows: <li id="1">Pai <ul> <li id="2">Item 01</li> <li id="3">Item 02 <ul> <li id="4">Item 03</li>...
asked by 07.05.2018 / 07:13