I have two tables in my database: appointments and users. They have the same named column: id
.
When I made a mysqli_fetch_array
for my query, how can I get the id
from the appointments, not from the users? In default, the while loop get the 'users'->'id'.
$query_pagination = "SELECT ap.*, us.*
FROM appointments AS ap, users AS us
WHERE us.id = ap.user_id AND
us.nev LIKE '%".$search."%'"
while($row = mysqli_fetch_array($result))
{
echo $row["id"]; //i want to echo here the id from appointments
}
?>