This is my query : ---SELECT CURDATE() AS today, YEAR(CURDATE()) - YEAR(Dateofbirth) - IF(RIGHT(CURDATE(), 5) < RIGHT(Dateofbirth,5),1,0) AS age, users.Dateofbirth, users.userID, users.Firstname, users.Lastname, users.Dateofbirth, FROM users ORDER BY users.userID desc----
After when iam going to add a filter i want to select derived value of age. is it possible ? if not
than please tell me how to add derived value of age to filter by changing the below code ?
<?php //************************** // Advanced Search // http://www.DwZone-it.com // Version: 1.0.2 //************************** $dwzSearch_1 = new dwzSearch(); $dwzSearch_1->Init(); $dwzSearch_1->SetFormName(""); $dwzSearch_1->SetSubmitName(""); $dwzSearch_1->AddFilter("users.Gender", "=", "", "lookingfor", "", "S", "0"); $dwzSearch_1->AddFilter("users.Dateofbirth", ">=", "", "ageFrom", "", "N", "0"); $dwzSearch_1->SetRecordset($Recordset1age, "Recordset1age"); $dwzSearch_1->SetSql($query_Recordset1age); $dwzSearch_1->SetConnection($hostname_-----, $database_----, $username_----, $password_----); $dwzSearch_1->Create(); if($dwzSearch_1->HasFilter()){ $dwzSearch_1->FilterRecordset(); } //************************** // Advanced Search // End code //************************** ?>
please help me urgent! Thanks in advance! |
|
|