/ Published in: PHP
URL: http://www.itsgotto.be/cv.php
Simple function to return the total records in a DB. This function probably has to be modified for every project you do to adjust for your db layer and server. I have it here simply because I use ado-db lite and my other functions almost all the time.
Expand |
Embed | Plain Text
<?php // Function Get Total Records // // Get the total records from a db table // // $table -> the table to check // $where -> optional WHERE clause // function getTotal( $table , $where = "" ) { $qr = dbquery( $q ); // your db query probably differs I use ado db lite wrapper. return $qr->fields['total']; } ?>
You need to login to post a comment.
