Query mysqli with error

Asked

Viewed 21 times

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

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.