Questions tagged as 'mysqli'

1
answer

ERROR Parse error: syntax error, unexpected ''

this error is appearing in my code: Parse error: syntax error, unexpected '<' in /home/storage/3/da/ca/public_html/ViewRevisao.php on line 110 What would be the solution in this case <?phpinclude_once("conexao.php"); $...
asked by 26.05.2018 / 17:24
1
answer

How to check if the number of mysql results is empty?

I'm having a hard time displaying a message when the query returns no results. When select returns 1 result "if(mysqli_num_rows($result1) > 0)" is showing correctly, but when it does not return, it does not contain anything (...
asked by 11.12.2017 / 06:22
1
answer

(PHP) What variable I put inside mysqli_affected_rows

<?php $conexao = mysqli_connect("localhost","root","","banco"); $nome = isset($_REQUEST['nome'])?$_REQUEST['nome']:""; $telefone = isset($_REQUEST['telefone'])?$_REQUEST['telefone']:""; $sql = "insert into tb_banco(nome, telefone)values('$n...
asked by 11.06.2018 / 22:35
1
answer

Sort select by date

How to sort this select by DATA? (SELECT * FROM mensagens WHERE de = '2' && para = '1' ORDER BY data) UNION (SELECT * FROM mensagens WHERE de = '1' && para = '2' ORDER BY data) Test: link     
asked by 28.07.2017 / 03:07
1
answer

How to do encrypted password queries in the database?

Well, I created a function called UserSearch that should encrypt the user's password and compare it to the database, but every time I run I get the error:    Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean gi...
asked by 23.07.2017 / 06:11
1
answer

Insert data into the bank with codeigniter

I need to display and save data in my database but as I'll show below I'm using Joins to display, for example the name of an author using their primary key. For display is working, but when I use my method to insert data into the table it r...
asked by 23.01.2017 / 19:52
1
answer

Call to a member function mysqli_fetch_object () on a non-object [closed]

I'm creating a system of likes and it's currently connecting to Mysql, so now I'm migrating to Mysqli, but it's giving an error and I can not solve it at all: connection.php <?php $servidor = 'localhost'; $usuario = 'root'; $senha = ''; $...
asked by 24.12.2016 / 13:40
1
answer

Send email with specific content of each line returned from mysql

I need to send an email telling the user that your request is expired, I'm going to the bank and I'm looking for all the records in this condition, the problem is that the body of the email has to be the content of each line returned. In each e-...
asked by 27.12.2016 / 12:33
1
answer

PHP function only works on the first call

I'm calling the same php function, in which I pass as a parameter a result of the database, twice in the script but it only works on the first call. I noticed that if I call the function that returns the result of the query and move it to ano...
asked by 12.08.2016 / 22:37
1
answer

Error in newer versions

I have this line on the server that uses PHP and MYSQL in earlier versions than on my local machine, it works perfectly on the server, however on my machine with more current versions it does not work. Is there a problem with this line in the...
asked by 27.04.2017 / 20:29