0
I am updating my mysql system to mysqli and I am not able to do one of the queries. I’ve tried a thousand different ways but the error remains. It should be simple but it’s not working. Someone has a light?
$resultadod = mysqli_query($con, "SELECT id FROM ferias
where usuario_id = $usuario_id
and date_format(fp.dt_inicio, '%Y-%m-%d') <= date_format('$d', '%Y-%m-%d')
and date_format(fp.dt_fim, '%Y-%m-%d') >= date_format('$d', '%Y-%m-%d'");
$row=mysqli_fetch_assoc($resultadod);
$idd = $row["id"];
The error is this: Warning: mysqli_fetch_assoc() expects Parameter 1 to be mysqli_result, Boolean Given in
I don’t know if this solves it but it’s missing close parentheses from
mysqli_query(
– rLinhares
Put the variable
$con
insidemysql_assoc
– adventistaam
So: $Row=mysqli_fetch_assoc($con, $resultadod); it didn’t work... Actually I just want to know if it brings results but mysqli_num_rows also worked....
– Marcos Vinícius Rinaldi
I changed all the research and now I got it! Thanks!!!!!!
– Marcos Vinícius Rinaldi
Possible duplicate of Mysql error "expects Parameter 1 to be Resource, Boolean Given in"
– Patrick Perdigão