Can anyone help me? I have the following problem: I have 2 tables and in these 2 tables I have the names, being that in the course table I have nome
and in the category table I also have the nome
field. My question is this: how do I do this in PHP
? I'm trying to do this:
$sql = mysqli_query($mysqli, "SELECT cur.nome, cat.nome FROM cursos cur INNER JOIN categorias cat ON cur.id_curso = cat.id WHERE cat.id = '$id_categoria'");
$row = mysqli_fetch_array($sql);
After this, I do not know how I select both the course name and the category name. Could someone help me?