I want to show in my php file taking from my MySQL database the ClientCode and CustomerName of my table Customers of my Database 'gardening', this is the code I have but nothing is shown to me in the browser. The connection to the database works correctly since I do not get the error message .. Where is the error?
<?php
$conex=mysqli_connect("localhost","root","","jardineria");
if($conex->connect_errno){
echo "ERROR EN LA CONEXION BDD";
exit();
}
else{
$consulta="SELECT*from Clientes";
$conex=mysqli_query($conex, $consulta);
while($fila=mysqli_fetch_array($conex, MYSQL_ASSOC)){
echo $fila['CodigoCliente'];
echo $fila['NombreCliente'];
}
}
?>