close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

search date from age number

Thread began 6/07/2010 6:46 pm by Miguel | Last modified 6/08/2010 12:12 pm by Miguel | 1037 views | 1 replies

Miguel

search date from age number

Hello again, i been going in circles to find a solution to do a search let me explain i got a table of users

USERTB
name varchar 150
email varchar 150
birthdate date
country varchar 150

Im trying to do a search by age with filters like user from canada that are 20 years old how can i acomplish this with dataassist i have the birthdate field as date and have a function to show on the list how old is the person
displaying the age based on the birth date but how do i do the oposit typing in an age 20 or 30 years old and it displays the users on that range using the data assist search wizard?

php:
function cumple ($cumple){
    list($year,$month,$day) = explode("-",$cumple);
    $year_diff  = date("Y") - $year;
    $month_diff = date("m") - $month;
    $day_diff   = date("d") - $day;
    if ($day_diff < 0 || $month_diff < 0)
      $year_diff--;
    return $year_diff;
  }

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...