Le jeu CrypText

           Le plaisir de reconstituer les plus beaux textes de langue française


nbHit + 1; mysql_query("update compteurs set nbHit = $cpt where cle = '$cle'"); } mysql_free_result($result); } // -------------------------------- function getCompteurs($cle) { $result = mysql_query("select * from compteurs where cle = '$cle'"); $row = mysql_fetch_object($result); if ($row) $cpt = $row->nbHit; else $cpt = 0; mysql_free_result($result); return $cpt; } // -------------------------------- function getNom($cle) { $result = mysql_query("select * from compteurs where cle = '$cle'"); $row = mysql_fetch_object($result); if ($row) $res = $row->nomComplet; else $res = ""; mysql_free_result($result); return $res; } // -------------------------------- function getTotalHitsCompteurs() { $result = mysql_query("select sum(nbHit) as total from compteurs"); $row = mysql_fetch_object($result); if ($row) $total = $row->total; else $total = 0; mysql_free_result($result); return $total; } ?>