Questions tagged as 'mysql'

0
answers

Displaying database row with while loop in input

I am trying to do something where it is possible to change the values of each row to then update the database but I am not understand why my input value only shows the first one in the database and as the while repeats create that the values wou...
asked by 18.05.2018 / 17:13
1
answer

UPLOAD of files via php and mysql

I'm trying to make a database for personal use that is to upload ticket and then voucher, but I do not know what I'm doing wrong because in MySQL only a binary file stays and not the photo or pdf I put. p> Andalsofollowscode<?phprequire'ba...
asked by 20.05.2018 / 05:56
0
answers

Loop inside another loop (while) in PHP + Smarty

I have a Loop (while) of the POST photos inside the POST loop. The following is happening: It turns out that all PHOTOS are appearing within each POST at all, rather than just the photo of each post. In PHP: foreach($resultado as...
asked by 20.05.2018 / 00:43
1
answer

whereIn and whereNotIn clauses

I have two tables, one I have the disciplines and the other I have the period_disciplines, filter effect in the course and period. I need to bring only the disciplines that are not released in the table of period_disciplines, so that the user ca...
asked by 26.05.2018 / 15:27
1
answer

PHP error connecting to MySQL database

Although I have not changed the settings of my MySQL database that has worked well for months, the connection has stopped working. This is the PHP command I use to make the connection: $this->link = @mysqli_connect($this->host,$this-&...
asked by 26.05.2018 / 13:52
3
answers

How to do an operation on a Trigger? MYSQL

CREATE TRIGGER aumentarsalario AFTER INSERT ON empregados FOR EACH ROW BEGIN UPDATE EMPREGADOS SET SALARIO = NEW.SALARIO * (NEW.SALARIO*(10/100)) WHERE NEW.SALARIO < 900; END IF END How do I put another 10% on a product? at which point...
asked by 17.05.2018 / 21:32
0
answers

Error in MySQL procedure

People are doing this procedure: CREATE DEFINER='root'@'localhost' PROCEDURE 'adicionarPessoaTelefone' (IN cpf VARCHAR(14) , IN nome VARCHAR(100), IN rg VARCHAR(9), IN data_nasc DATE, IN end_rua VARCHAR(200), IN end_bairro VARCHAR(25), IN...
asked by 17.05.2018 / 08:11
1
answer

Loop to show all news

I'm trying to make a backoffice for my website so I can post news! Does anyone know how to loop to show each of the rows in my database? Thanks to those who help! Note: I'm new to PHP and Mysql          date_default_timezone_set('Europe/Lis...
asked by 16.05.2018 / 16:18
0
answers

pass value to php variable

I have this code: var $login = $("input[name='usuario']"); var dadosajax = { 'cod': elemento.value, 'login': $login.val(), }; pageurl = 'salvar_dados_usuarios.php'; $.ajax({ //url da pagina url: pageurl, //parametros a p...
asked by 22.05.2018 / 20:23
2
answers

My PHP does not save in DB

The connection to the DB was successfully established. If I play the same Query in PhpMyAdmmin the command works and the data is saved in the DB. But if I use the same command in PHP it just does not save in the DB. Index.php file below: &l...
asked by 20.05.2018 / 23:22