Problema con contador de visitas a links esternos.
Publicado por pixel2you (6 intervenciones) el 11/04/2006 18:54:56
Buenas gente, os comento:
Estoy intentando hacer un ranking de visitas sobre estas 4 webs;
La tabla MySQL es la siguiente:
CREATE TABLE 'click' (
'id' int(11) NOT NULL auto_increment,
'ip' varchar(225) default NULL,
'dia' int(11) default NULL,
'mes' int(11) default NULL,
'ano' int(11) default NULL,
'ordenafecha' int(11) default NULL,
'link' varchar(225) default NULL,
PRIMARY KEY ('id')
) TYPE=MyISAM AUTO_INCREMENT=293 ;
En código.php esta lo siguiente:
$informage=mysql_query("select * from click where link='http://www.informagestudios.com/'");
$turi=mysql_query("select * from click where link='http://www.wilotas.com/'");
$tuyo=mysql_query("select * from click where link='http://www.tuyo.com/'");
$otro=mysql_query("select * from click where link='http://www.otro.com/'");
Pero tengo una duda,como calculo yo, del mayor al menor? porque lo estoy intentando hacer con ifs.. pero es imposible..
Muchas gracias.
Un saludo.
Estoy intentando hacer un ranking de visitas sobre estas 4 webs;
La tabla MySQL es la siguiente:
CREATE TABLE 'click' (
'id' int(11) NOT NULL auto_increment,
'ip' varchar(225) default NULL,
'dia' int(11) default NULL,
'mes' int(11) default NULL,
'ano' int(11) default NULL,
'ordenafecha' int(11) default NULL,
'link' varchar(225) default NULL,
PRIMARY KEY ('id')
) TYPE=MyISAM AUTO_INCREMENT=293 ;
En código.php esta lo siguiente:
$informage=mysql_query("select * from click where link='http://www.informagestudios.com/'");
$turi=mysql_query("select * from click where link='http://www.wilotas.com/'");
$tuyo=mysql_query("select * from click where link='http://www.tuyo.com/'");
$otro=mysql_query("select * from click where link='http://www.otro.com/'");
Pero tengo una duda,como calculo yo, del mayor al menor? porque lo estoy intentando hacer con ifs.. pero es imposible..
Muchas gracias.
Un saludo.
Valora esta pregunta


0