hi
I am creating a php web but encountered this php search coding with errors.
my php testing web page is at http://seagift.biz/Jobs1/jobsjobs_list.php
[php]
//// php search coding
global $dal;
$message=“Search by Location
”;
////City
$dal_table=$dal->Table(“jobsjobs”);
$str = “select count(Id) as numbers, City from “.$dal_table->TableName().” group by City”;
$rs = CustomQuery($str);
while ($data = db_fetch_array($rs))
{
$City = str_replace(" “,”+",$data[“City”]);
$message.="<a href=“jobsjobs_list.php?ctlSearchFor=”.$City."&srchOptShowStatus=0&ctrlTypeComboStatus=0&srchWinShowStatus=0&a=integrated&id=1&criteria=and&value11=".$City."&field1=City&option1=Equals">".$data[“City”]." (".$data[“numbers”].")
";
////DateAdded
$str2 = “select count(Id) as numbers2, DateAdded from “.$dal_table->TableName().” where City=’”.$data[“City”]."’ group by DateAdded";
$rs2 = CustomQuery($str2);
while ($data2 = db_fetch_array($rs2))
{
$DateAdded = str_replace(" “,”+",$data2[“DateAdded”]);
$message.=" <a href=“jobsjobs_list.php?ctlSearchFor=”.$City."&srchOptShowStatus=0&ctrlTypeComboStatus=0&srchWinShowStatus=0&a=integrated&id=1&criteria=and&value11=".$DateAdded."&field1=DateAdded&option1=Equals">".$data2[“DateAdded”]." (".$data2[“numbers2”].")
";
}
}
$xt->assign(“ListOnLoad”,$message);
[/php]
1st scenario
when I click the Central [City] + 2014-11-21 (53) [DateAdded] . pls see attached locationCENTRAL.
I get the actual result seach => 53 of Central
2nd scenario WITH ERROR
when I click the East [City] + 2014-11-21 (31) [DateAdded] . pls see attached locationEAST.
I get the INCORRECT result seach =>71 of East [31], Central [1] & North-East [39]
could someone help me?
thanks a lot in advance