Questions tagged as 'mysqli'

2
answers

Group By different results

Hello, I have a question if anyone can help me about SQL. I know the Group By clause, as far as I know how to group similar data. But I understand that it should group but in the script below it has the group by show lines and without the group...
asked by 24.08.2017 / 22:16
2
answers

Select in MySQL with an array

I have a form with a field multiple select : <form action="processa-chose.php" method="post"> <select id="selecionar" name="fornecedor[]" data-placeholder="Fabricantes" style="width:350px;" multiple...
asked by 25.08.2014 / 15:06
3
answers

Insert data from a combobox into a SELECT

Good afternoon! I have the following problem, I have to withdraw reports from a certain database where I should select specific employees, the same should be selected from a combobox: <select name="usuario" id="usuario"> &l...
asked by 30.04.2015 / 19:02
1
answer

PHP - Why should I put an IF in mysqli_prepare ()

In the example discussed in the PHP Manual , if instructions. I know that if is used for comparisons, what comparison is being made here? Here is an example from the website below: <?php $mysqli = new mysqli("localhost", "my_user", "my...
asked by 26.07.2016 / 20:46
2
answers

View and edit registered data

I created a registration system and wanted to know how to make the information that was registered appear on the page and that the user can edit it. Follow my code below. <body> <form action="" method="POST"> <label><br /&...
asked by 11.06.2015 / 13:15
3
answers

SELECT in two tables, with comma-separated IDs

Hello! How to do a SELECT that returns the data of the first table, whose "id" are separated by commas in the second table? Example: tbl_cores id | cor 1 | azul 2 | verde 3 | amarelo 4 | vermelho tbl_mesa id | core...
asked by 13.06.2016 / 14:07
3
answers

Why is mysqli_ better than mysql_? [duplicate]

I would like to know what are the advantages that mysqli_ has in relation to mysql_ , as it is suggested to me directly to mysqli_ .     
asked by 15.07.2015 / 15:28
1
answer

Exchange% 20 for + in search via GET

When I do a search via GET through a form the url looks like this:    test.txt? I would like it to look like this:    test.blogspot.blogspot.blogspot.com Does anyone know how to do this? Reference: link Form Code: <form cl...
asked by 14.09.2018 / 21:42
2
answers

How to create Exceptions to treat statement with Mysqli

I'm migrating from PDO to Mysqli and when doing some operation with the bank, the check block was like this: $query = $db->prepare("ppapapa sql sql"); try { $query -> execute(); return $query -> fetchAll(); } cat...
asked by 18.10.2015 / 13:44
2
answers

How to keep the variable with the same value in the database?

I have a question in the code below: <?php include "conexao.php"; $id = $_POST["id"]; $nome = isset((trim(ucwords($_POST["nome"])))) : (trim(ucwords($_POST["nome"]))) : $apelido = trim(ucwords($_POST["apelido"])); $telefone = trim($_POS...
asked by 20.09.2017 / 00:29