I have the following quey:
$query = "SELECT pedidos.*, users.id, users.nombre, users.email, users.username FROM pedidos INNER JOIN users ON pedidos.usuario=users.idusuario WHERE (email LIKE '%$busqueda%' OR nombre LIKE '%$busqueda%' OR monto LIKE '%$busqueda%' OR usuario LIKE '%$busqueda%' OR nro_transf LIKE '%$busqueda%' OR ci_nro_cuenta LIKE '%$busqueda%' OR banco_emisor LIKE '%$busqueda%' OR banco_destino LIKE '%$busqueda%') ORDER BY id DESC LIMIT $init, $limit_end";
And I would like to know how I can get the users.id data since I need it for a function within the same while and I would not like to make another query for it.
I already have inside my while:
while($row = $c->fetch_array(MYSQLI_ASSOC))
{
$rowUser = $row['usuario'];
$rowid = $row['id'];
//$userid = $row['id.users'];
I have already taken the id from the table as $ row ['id']; and I need to assign the value to the variable $ userid with the value of the user id and I do not know how to do it .