Hi all

i am having trouble with this code i am using but i get this error for some odd reason i see my query is all correct no errors in the query here is what the full error message said.

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\Program Files\xampp\htdocs\BC Clan Scripts\index.php on line 461

Now when i go to the code this is what it is

PHP Code:
                                function calcDSL($LastedLogin)
                 {
                      
$today=date("Ymd");
                      include(
"dbconnect.php");    
                      
$dQuery="SELECT TO_DAYS($today)-TO_DAYS($LastedLogin) FROM members";
                      
$rs mysqli_query($con,$dQuery);
                      
$days mysqli_fetch_array($rs);
                      return 
$days[0]; 
                } 
What is wrong?

what did i do wrong?