note 59673 added to function.msql-num-rows

From: Date: Tue, 13 Dec 2005 06:15:49 +0000
Subject: note 59673 added to function.msql-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-100044@lists.php.net to get a copy of this message
Pour obtenir le nombre de lignes de résultat d'une requête, il faut d'abord accomplir la requête. J'ai essayé la commande "Select count (*) ... " sans succès, voici comment compter efficacement le nombre de résultats obtenus par une requête: $requete = "SELECT * FROM databasename WHERE date1 >= '2005-12-01' AND champ2 <= 'critère2'"; $resultat = mysql_query ($requete, $db); $NbLignes = mysql_num_rows($resutat); ---- Manual Page -- http://www.php.net/manual/en/function.msql-num-rows.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59673 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59673&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59673&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59673&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59673&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59673&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59673&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59673&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59673&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100044) next »