Hi,
Iam having two tables one is search engines[contains search engine names] and other is records which contain referrer etc i want to retrive search engine and select referrer with that name i should create an array to insert the names and count and return the array how to do this
class SearchEngines{
function getSearchEngines(){
$qry = "select names from search_engines";
$res = mysql_query($qry);
$numrows = mysql_num_rows($res);
for($i=0;$i<$numrows;$i++){
$arynames = mysql_fetch_array($res);
$search_engine_name = $arynames['names'];
$qry_records = "select referrer from records where referrer like %$search_engine_name%";
$res_records = mysql_query($qry_records);
$numrows_records = mysql_num_rows($res_records);
for($j=0;$j<$numrows_records;$j++){
$ary = mysql_fetch_array($res_records);
/*
Here i should create a array and check whether the search engine already there
if yes means update the count or else insert new array like this
array(array([url]www.yahoo.com,3[/url]),
array([url]www.google.com,5[/url]),
array([url]www.ask.com,2[/url])
how to do this ??
)
*/
}
}
return $arrays;
}
}
help me
thanks and regards
nanban