First off, i don't understand you question. Try to ask the question in your own language i'll try to translate it myself. Or use www.systransoft.com to translate into English. (not a bash, i don't speak every language in the world either.)
First remark on your code instead of this
$get_sites_count = sql_query("
select
ID
from
$tb_links
");
$total_sites = sql_num_rows($get_sites_count);
do this
$get_sites_count = sql_query("select count(ID) as amount from $tb_links ");
$result = sql_fetch_array($getsites);
$total_sites = $result['amount'];
This way your not tranfering a huge recored set from DB to PHP but jst a single number.
And then this code
if($show == "cool"){
$result = mysql_query(" hits_in");
while ($row = mysql_fetch_array($result)) {
$id = $row["id"];
// HERE CATEGORIES NAME
$www = mysql_query("select * $tb_links.ID as site_id");
while ($web = mysql_fetch_array($www)) {
$wid = $row["id"];
// HERE CATEGORIES INCLUDED
$sql .= "hits_in ";
}
I don't understand what is you try to do:
1) mysql_query(" hits_in");
How can that be a SQL statement?
2) while ($web = mysql_fetch_array($www)) {
$wid = $row["id"];
You itterate over a record set but always overwrite $wid same with $id??
😕
Try to be more specific in your question and give some explenation with your code 'cause i don't understand halve of what you ar doing