This is not returning anything. Am I Doing this right? I am trying to return the number of days between these two dates. "LastChanged' Is a field in the database containing a Date.
$UserID=$_SESSION["SESSION_USERID"];
$Today=date("Y-m-d");
$Sql="SELECT ChangePass, TO_DAYS(NOW())-TO_DAYS('LastChanged') AS TheDays FROM tblUsers WHERE UserID ='$UserID'";
$Result=mysql_query($Sql) or die (mysql_error);
$ResultArray=mysql_fetch_array($Result);
Print $ResultArray['TheDays'];
if ($ResultArray['ChangePass']=='YES'){
Print $ResultArray['TheDays'];
}