I have this error in my code:
Warning: mysql_fetch_array () expects parameter 1 to be resource, boolean given in ... on line ...
It seems to be the syntax of the sql array line, but I do not see how to fix it. Does anyone know what the problem is?
Here my code:
<div class="section">
<?php
$numCedula = htmlentities($row['NumCedula'],ENT_QUOTES,'utf-8');
$sql="SELECT * FROM users WHERE Patrocinador = {$numCedula}";
$result = mysql_query($sql) ;
//echo [$result];
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
?>
<div class="mis_afiliados_1">
<a>
<img src="<?php echo $row['avatar'];?>" alt="Avatar" /><br>
<?php echo $row['nombre']; ?><br>
<?php echo date('d/m/Y',$row['signup_date']); ?>
</a><br>
</div>
<?php } ?>
</div>