Hello everybody, and let me thank iyou for the help up front 🙂 Thank you...
I was wondering if there way a better way of doing this. Here is my code
if ($state == "any" and $age1 == "any" and $country == "any")
{
$query3 = "select from Login, UserInfo where Login.Ref = UserInfo.Ref AND Login.Sex = \"$status2\" AND Login.Psex = \"$status1\" limit $offset,$limit";
}
if ($state == "any" and $age1 == "any")
{
$query3 = "select from Login, UserInfo where Login.Ref = UserInfo.Ref AND Login.Sex = \"$status2\" AND Login.Psex = \"$status1\" and UserInfo.Country = \"$country\" limit $offset,$limit";
}
if ($state == "any")
{
$query3 = "select from Login, UserInfo where Login.Ref = UserInfo.Ref AND Login.Sex = \"$status2\" AND Login.Psex = \"$status1\" and UserInfo.Country = \"$country\" AND UserInfo.Age =< \"$age1\" and UserInfo.Age => \"$age2\" limit $offset,$limit";
}
if ($state == "any" and $country == "any")
{
$query3 = "select from Login, UserInfo where Login.Ref = UserInfo.Ref AND Login.Sex = \"$status2\" AND Login.Psex = \"$status1\" AND UserInfo.Age =< \"$age1\" and UserInfo.Age => \"$age2\" limit $offset,$limit";
}
if ($age == "any" and $country == "any")
{
$query3 = "select * from Login, UserInfo where Login.Ref = UserInfo.Ref AND Login.Sex = \"$status2\" AND Login.Psex = \"$status1\" AND UserInfo.State = \"$state\" limit $offset,$limit";
}
if ($country == "any")
{
$query3 = "select * from Login, UserInfo where Login.Ref = UserInfo.Ref AND Login.Sex = \"$status2\" AND Login.Psex = \"$status1\" AND UserInfo.State = \"$state\"AND UserInfo.Age =< \"$age1\" and UserInfo.Age => \"$age2\" limit $offset,$limit";
}
if ($age == "any")
{
$query3 = "select * from Login, UserInfo where Login.Ref = UserInfo.Ref AND Login.Sex = \"$status2\" AND Login.Psex = \"$status1\" AND UserInfo.State = \"$state\" and UserInfo.Country = \"$country\" limit $offset,$limit";
}
All it is, is the query for the select statement.
But i have posted like 4 times trying to get a response to my question.. So maybe i am asking it wrong.. 🙂
IS there a better way of edoing that above?>
Thanks
Chris Calzaretta