note 39272 deleted from function.odbc-num-rows by nlopess

From: Date: Thu, 22 Jan 2004 21:01:26 +0000
Subject: note 39272 deleted from function.odbc-num-rows by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-64044@lists.php.net to get a copy of this message
Note Submitter: webmaster@thaiwebfreelances.com ---- I use SELECT count(*) method and use WHILE loop to pickup the result of value. In reality, these WHILE loop will loop only one time, because it has only 1 line result in return. // count how many records of that table // (odbc_num_rows function has some error with ACCESS, can't use it) $sql_count_rows="SELECT count(*) FROM $tbl_name"; $result_count_rows = odbc_exec($conn_dsn, $sql_count_rows) or die('Select failed!'); while(odbc_fetch_row($result_count_rows)){ $n_rcd=odbc_result($result_count_rows,1); // value 1 mean the 1st field of record } echo $n_rcd."<br>";

« previous php.notes (#64044) next »