0
The result of the following SELECT
<?php
include_once("conect.php");
$id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING);
$result_usuario = "SELECT * FROM produ_usu WHERE id = '$id'";
$resultado_usuario = mysqli_query($conn, $result_usuario);
$row_usuario = mysqli_fetch_assoc($resultado_usuario);
if(($resultado_usuario) AND ($resultado_usuario->num_rows != 0)){
while($row_usuario = mysqli_fetch_assoc($resultado_usuario)){
?>
only returns data from the second INSERT with same id (user id).
I know the trouble is caused by the line
$row_usuario = mysqli_fetch_assoc($resultado_usuario);
just below the line
$resultado_usuario = mysqli_query($conn, $result_usuario);
Comment the line and SELECT returns after a user’s first INSERT with his id normally.
In short, I do not understand why with the infamous line only returns from the second insert
The question is: why does this line return only after the second Insert of the same id?
Already gave a var_dump($row_usuario); to make sure that all data is coming correctly?
– adrianosmateus