10
maybe someone can help... Pascal could drop in too :)
here's the details--
DATABASE:
1. xoops_visit_user_page table
INSERT INTO `xoops_visit_user_page` VALUES ('6', 'username', '/page.php', ... );
INSERT INTO `xoops_visit_user_page` VALUES ('7', 'username2', '/page.php', ... );
xoops_visit_user_page structure:
(`id` int(11) NOT NULL auto_increment,
`nom` varchar(100) NOT NULL,
`page` varchar(200) NOT NULL,
`nav` varchar(150) NOT NULL,
`langue` varchar(20) NOT NULL,
`enregis` varchar(20) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
2. xoops_visit_user table
INSERT INTO `xoops_visit_user` VALUES ('1', 'username', '4', '00.00.00.000', '1115132593', '1115132654');
INSERT INTO `xoops_visit_user` VALUES ('2', 'username2', '2',
(`id` int(11) NOT NULL auto_increment,
`visitname` text,
`nvisit` int(7) NOT NULL default '0',
`ip` varchar(16) NOT NULL,
`temps` varchar(30) NOT NULL,
`tempsf` varchar(30) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
____________________________________
VISIT DETAILS [xoops module admin]:
user-visit.php?vm=username
user-visit.php MySQL queries:
$visit= mysql_query("SELECT * FROM ".$xoopsDB->prefix("visit_user")." WHERE visitname = '$vm' ORDER BY temps");
$visi=mysql_NumRows($visit);
$visit = mysql_query("SELECT distinct page, count(page) as cpage FROM ".$xoopsDB->prefix("visit_user_page")." WHERE nom = '$vm' GROUP BY page ORDER BY page ASC");
$visi=mysql_NumRows($visit);
...
$visit2 = mysql_query("SELECT distinct nav, count(nav) as cnav, langue FROM ".$xoopsDB->prefix("visit_user_page")." WHERE nom = '$vm' GROUP BY nav ORDER BY cnav DESC");
$visi2=mysql_NumRows($visit2);
_________________________________________________________________________
should I try something like
$visit = mysql_query("SELECT /page.php FROM ".$xoopsDB->prefix("visit_user_page")." WHERE nom = '$vm' GROUP BY username ORDER BY username ASC");
$visi=mysql_NumRows($visit);