Questions tagged as 'mysqli'

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

How to insert data into two tables at the same time?

I need to do an insert as follows: I have two tables TABELA 1 and TABELA 2 and a form of cadatro. This form has three inputs: input 1, input 2, input 3 input 1 must be entered in TABELA 1 . input 2 e in...
asked by 12.03.2015 / 16:15
2
answers

PHP - Bring the result of a table according to the most recent message from another table?

So .. I have 3 table: user: | ID | NOME | SOBRENOME | | 01 | Igor | Ferreira | | 02 | João | Henrique | | 03 | Rose | Beltão | following: | ID | user1_id | user2_id | | 01 | 01 | 02 | User 1 > Segu...
asked by 30.07.2015 / 13:51
1
answer

Memory overflow with mysqli_query

The following statement caught the program: $result = mysqli_query($db, 'SELECT * FROM base'); And returned the following error:    PHP Fatal error: Allowed memory size of 134217728 bytes exhausted   (tried to allocate 4194312 byte...
asked by 27.07.2018 / 04:31
2
answers

Helps to make a condition in php

I have here my php code so that you can delete the client, but only delete it when you write the client name (which is in the html). but I do not know how to make the condition if someone writes a name of a client that is not in the database. An...
asked by 15.06.2015 / 00:19
4
answers

MySQLi vs PDO - Which is the most recommended to use?

With mysql_* entering the deprecated state, the PHP documentation recommends using the PDO and MySQLi. Which do you recommend for use? PDO seems to be more suitable for working with object-oriented only than at the same time I saw...
asked by 06.03.2014 / 18:10
1
answer

Doubt about relationship between tables in mysql

I have the following tables: Table: Customers Table: Customer Interests Table: User In the customer interests table, I need to insert the user id and client id as foreign keys, the user id I'm going to get from a session. I n...
asked by 23.11.2015 / 14:39
3
answers

DELETE FROM users WHERE user_id = $ id

I have a script of simple PHP + MySQL query: <table > <tr> <td ><h2>GERENCIAR ANUNCIOS </h2></td> </tr> <tr> <td > <table > <tr> <th >ID</th>...
asked by 30.01.2015 / 13:02
2
answers

How to detect intrusion attempts? [duplicate]

In order to protect against SQL injection, I need to devise a function that eliminates the possibility of someone trying to act in bad faith. The question is, does mysqli bring with it any functionality to help counter this? In addit...
asked by 20.10.2015 / 07:20
3
answers

Error creating a MySQL database via PHP in WampServer

I have a problem when creating the database, on the net I found little content about, only meeting how to mount database by phpMyAdmin, but it is via script that I want to create. > I have the following code: <?php $mysqli = new mysqli...
asked by 28.09.2014 / 14:52