I had a mysql table with a field named "age". And I need to search it using php form. ie with two text fields called "age_from" and "age_to".
In simple words i want to do a search like this...

search * from profile where age>= age_from and age <= age_to ;

Please help me with a right query. ( in php )

Thanks in advance
Rajeesh

I think you can do that.

$Statement = "Select * from profile where age between " . $age_from . "and " . $age_to.";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.