Questions tagged as 'mysqli'

1
answer

Select database data within another while?

I have a calendar made by me, not very good, but done by me, in which you have a while that creates squares, that is, the days, of the current month. So far so good, but now I would like it if one day had an event, it would change the color of t...
asked by 02.11.2017 / 18:41
3
answers

Save multiple records in the bank

I'm using the following code to no avail. $conn = mysqli_connect('localhost','user','pass','banco'); try { $body = file_get_contents("php://input"); $dados = json_decode($body); foreach($dados as $data...
asked by 09.10.2017 / 01:52
1
answer

Implement a fun button in PHP and mysqli

I'm trying to implement a liking button on a system that I'm designing as test. It already changes the value of tanned in the database, however I have to put the value in an input field that I put. So every number that I put in the input and cli...
asked by 19.09.2017 / 19:04
1
answer

My login does not get $ _SESSION [closed]

I have the following codes: conn-login.php : <?php session_start(); header('Access-Control-Allow-Origin: *'); //Conexão MYSQLI - LOGIN GLOBAL $mysqli = new mysqli('localhost', 'login', 'senha', 'bancodedados'); ?> login.php :...
asked by 19.09.2017 / 03:56
1
answer

Error: Uncaught Error: Class 'mysqli' not found

I'm using Apache to make a localhost site, but I have an online bank and wanted to access it I make the connection in php <?php $servername = "host.com"; $username = "user"; $password = "pass"; $dbname = "banco...
asked by 21.08.2017 / 17:13
1
answer

Get the last ID when inserting into the MySQL database

How to get the last ID when inserting in MySQL BD using PHP and MYSQLi. $inserir = $conexao->query("INSERT INTO cadastro (nome, sobrenome) VALUE ( 'Fulano', 'De tall' "); echo $id = mysqli_insert_id($conexao);    You...
asked by 23.07.2017 / 22:38
1
answer

Average MYSQL per minute

Hello, in the table below, you have to do a select that returns me the following: select the average current per minute between the day x and day y and that on the return display the day and minutes? I have one record per second in the table,...
asked by 28.06.2017 / 01:51
1
answer

Question form with radio button returning showing empty

Good evening,  I need to ask a question system exactly like this:      link I just need as many questions and answer options as come from the bank.  I tried this way only the radios are coming out empty, plus the query is ok, and running it...
asked by 11.07.2017 / 00:23
1
answer

Use php to set the column width depending on the result of the while

I have the following code $result_categorias = "SELECT * FROM categorias ORDER BY ordem ASC"; $resultado_categorias = mysqli_query($conn, $result_categorias); $total_categorias = mysqli_num_rows($resultado_categorias); $quantidade_pg = 3; <...
asked by 13.06.2017 / 14:48
1
answer

Do not repeat data returned Mysqli [duplicate]

I have this code that brings me the months registered in the bank. More like it has several lines, I want to return only once each value. // Fazendo a conexão $conexao = mysqli_connect($this->dbservidor,$this->dbusuario,$this->...
asked by 29.06.2017 / 20:23