Questions tagged as 'mysqli'

0
answers

How to edit a record and update immediately

How do I edit the value of presence ('P', 'F') and update in the database <table class="pauta"> <?php $consultaAluno=mysqli_query($conexao,"SELECT a.matriculaAluno, a.nomeAluno,aht.turma_codigoTurma FROM aluno a,aluno_has_...
asked by 20.05.2018 / 00:14
2
answers

How to switch from mysql_real_escape_string to mysqli_real_escape_string () ;?

I'm creating a simple php login page based on in this video . However, after doing exactly as the video describes, I learned that my PHP version has updated and can not use the command mysql_connect . <?php // Get values passe from f...
asked by 05.05.2018 / 15:30
4
answers

Show column sum of the logged in user. error

Good morning, someone help me? I do not understand much of php, but for me to finish my site there is only one thing: I need to post the sum of the values that are in the table but based on the logged in user, already tried in all the ways but I...
asked by 20.04.2018 / 16:50
2
answers

Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean given in [duplicate]

I have a simple problem when picking up a data from a table .. The error is    Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result,   boolean given in Code: $sql = mysqli_query($conexao, "SELECT diasvip FROM logi...
asked by 07.03.2015 / 14:48
1
answer

Change button Sign in to logout

First of all, I want to let you know that I am a beginner, both in PHP and in the database, and thank you for help because I need to deliver a job and I am in deadline I have a login button and I want you to switch to logout when the sessio...
asked by 01.04.2018 / 02:39
1
answer

Delete table record with foreign key

Where is the Error? DELETE FROM postagens WHERE id='$p_id' AND u_id='$u_id' SET FOREIGN_KEY_CHECKS = 0; Clarifications: p_id = post id (primary key) u_id = user id (foreign key)     
asked by 01.04.2018 / 20:09
0
answers

Problem with mysqli_insert_id - Class

I have a problem getting the last id inserted in a table, because it is returning empty. I searched the stack but could not find a solution. Script to include information in DB: if ( isset( $_GET['create'] ) ) { if ( isset( $_POST['de...
asked by 06.04.2018 / 15:43
1
answer

Echo respecting mysql line break

I would like to know how to make PHP echo respect the line break of a text in the database. I have a text field in the registration form like this: <textarea id="descricao" name="descricao" class="input form-control col-lg-10" row...
asked by 09.08.2017 / 19:45
0
answers

Insert a Select within the Mysqli Database

<?php session_start(); include("class/bloqued.php"); include_once("conexao.php"); seguranca_user(); $btnAnunciar = filter_input(INPUT_POST, 'btnAnunciar', FILTER_SANITIZE_STRING);{ if (isset($_POST["generogarota"])){ $g...
asked by 25.03.2018 / 22:32
3
answers

mysqli_escape_string () expects exactly 2 parameters, 1 given

I'm experiencing an error in my code, when I run the DW c6 server behavior, when I move from mysql_ to mysqli_ , I get an error in the function executed on line 10. The error is:    Warning: mysqli_escape_string () expects exa...
asked by 21.09.2015 / 17:06