Questions tagged as 'mysqli'

1
answer

Create a three-table Viewer

How to create a mysql view with 3 tables the following structure being cliente |id_cliente |nome_cliente produto |id_produto |nome_produto |valor_produto pedido |id_pedido |id_produto |id_cliente I would like to create...
asked by 07.06.2016 / 21:15
1
answer

how to do an update on the bank using checkbox

I would like to know how I can do an update with checkbox , with the system I developed I can get normal all checkbox that will be changed but I can not get the id from them how can I do this? below is the part of html...
asked by 23.10.2016 / 23:34
1
answer

How to "hide" the password that goes in mysqli_connect?

$server = exemplo.com; $user = root; $senha = 123; $conexao = msqli_connect($server, $user, $senha); I know that the php page is not visible to the user, but nowadays, you can not underestimate the cracker. So I would like to know if there is...
asked by 03.02.2017 / 21:31
2
answers

How to use sprintf to mount a SQL query? [closed]

What is the correct way to use sprintf in mysqli and make the return IF? $rs = $mysqli->query(sprintf("INSERT INTO perguntas (chave, nome, email, idade, estado_civil, profissao, religiao, assunto, pergunta, 'data') VALUES (%s, %s, %s...
asked by 04.01.2016 / 13:06
1
answer

Time difference in execution of the same query between PHP and PHPMYADMIN

I'm trying to improve the performance of my pages to improve the user experience, but I'm not able to identify the problem. According to Google, it is recommended that pages respond in less than 0.4 seconds, but only the connection to the dat...
asked by 19.07.2016 / 15:27
2
answers

$ _Session variable does not write to the database

I'm using mysqli and I can not save information in the database. I took the test with echo var_dump($_SESSION); echo "<br />"; echo $_SESSION['login']; Return value was: array (2) {["login"] = > string (6) "djalma" ["password...
asked by 03.09.2014 / 21:02
1
answer

Script does not save full word if you have accent

I have a script that works great on my dashboard, but I put it on another page and it is not working. When a word has an accent, eg "Natália" the system is saving in the bd just "Nat" excluding the rest that is part of the word. include "pa...
asked by 28.09.2018 / 21:15
1
answer

How to make the result of a column?

if(($resultado_usuario) AND ($resultado_usuario->num_rows != 0)){ ?> <style> tr:nth-child(even) {background: #CCC} tr:nth-child(odd) {background: #CCC} </style> <table class="table table-stri...
asked by 13.12.2018 / 02:45
2
answers

Register multiple images in the database on the same line | Mysql | PHP

I am not able to register multiple comma-separated image names in a single-column column, I am able to do multiple uploads, but each image name is registered on a different row in the database. And it wanted to type like this: the user uploads 5...
asked by 04.08.2018 / 22:00
1
answer

Error executing query within function

I'm having trouble doing a mysql query within a PHP function, if I do the search function off normally it works but I'd like it to be done inside the function for me to call when I want. Error: Undefined variable: conn in path\functions.ph...
asked by 14.07.2018 / 13:09