Questions tagged as 'mysqli'

2
answers

How to get the sum of three tables in sql

I have 3 Tables, which are: School: id , id_escola and nome_escola ; Teacher: id , id_escola and nome_professor ; Students: id , id_escola , sala_aula and numero_alunos ;...
asked by 30.07.2015 / 16:55
1
answer

Error in a SQL query in PHP [duplicate]

I am having difficulties with a SQL query in PHP, when I make a query I get the following error:    Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean given in C: \ xampp \ htdocs \ trabalhowebGustavo \ user \ B...
asked by 24.05.2015 / 20:17
2
answers

PHP and MySqli. Problem connecting to table

I'm following a toturial, everything looks the same. My problem is that I can not connect to the table. connect.php: <?php $db = new mysqli('127.0.0.1', 'user', 'pass', 'app'); if ($db -> connect_errno) { die ('Sorry...
asked by 23.06.2014 / 14:05
1
answer

PHP MYSQLi Array no select html

I'm a beginner in php and I'm developing a small system for my company that already serves as a study, because I really like this area, the question is simple, I have the following code: <?php include('conn/conexao.php'); $edt = $_GET['edit...
asked by 29.12.2014 / 14:00
1
answer

Update only the records marked with a checkbox at once php

I have a select that brings a series of records. Here, in these records I need to apply an up and that in my head, the best way would be to use a checkbox field, so that when the user marks the checkbox and then clicks the "submit" button, only...
asked by 07.11.2017 / 00:58
2
answers

Data does not appear on page

I made an OO code in PHP. I used MySQLi for the database and WAMPSERVER as the server, where I inserted data into the "category" table. The bank collation is "latin2_general_ci". There were no errors, but in the browser the data entered did not...
asked by 21.05.2015 / 20:37
0
answers

Bind Param with Array - PHP and MySQLi

I have the code: <?php $clientes = implode(', ', $clientes); $busca = $mysqli->prepare("SELECT nome FROM clientes WHERE id IN (?)"); $busca->bind_param("s", $clientes); $busca->execute(); $busca->bind_result($nome);...
asked by 07.05.2018 / 14:05
1
answer

How to insert a variable into an array?

I want to insert data into my database I'm using mysqli, I need to know how I would indicate an array inside a variable, here and my code I want to know if this is the correct way to do it require 'config.php' require 'connection.php' $nomear...
asked by 19.12.2016 / 20:37
6
answers

How to mount the HTML of a "select" via PHP, using data coming from the DB

I'm having trouble rightly mounting a <select> within PHP, with data returned by mysqli . I tried this way: <?php $con = new mysqli("localhost", "root", "senha","bancodedados" ) or die (mysql_error()); $query = $...
asked by 01.07.2014 / 19:36
4
answers

Does not write records to my database

I created a registration system, but when I click the register button the message "Could not insert record:" ... Someone can identify this error, because I have not been able to identify it yet. Follow my code below. cadastro.php <!DOC...
asked by 13.05.2015 / 12:55