Hi, is this the best way to switch a query
PHP Code:
$index = $_GET['index'];
if ($index==1) $index=1;
if ($index==1) $query1 = "SELECT COUNT(*) as num FROM $tbl WHERE test='1'";
else $query1 = "SELECT COUNT(*) as num FROM $tbl WHERE ip LIKE '$key'";
Thanks
Sonny