jasharen
07-08-2007, 06:12 PM
I am having a problem using a datamanager to return a record count for me. The sql server query returns 41 records and the datamanager entry returns 46.
Datamanager SQL statement:
SELECT COUNT(*) as count FROM " . TABLE_PREFIX . "companies"
$result = $db->query_read($dataman->fetch_count());
$list = mysql_fetch_object($result);
$totalcompanies = $list->count;
Any idea why this would be happening? Its driving me nuts lol
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'mydb';
mysql_select_db($dbname, $conn);
$result = mysql_query("select count(*) as count from companies");
$list = mysql_fetch_object($result);
$totalcompanies = $list->count;
echo $totalcompanies;
mysql_close($con);
When the above code is run it returns 41...
nm /sigh
My own stupidity.
Datamanager SQL statement:
SELECT COUNT(*) as count FROM " . TABLE_PREFIX . "companies"
$result = $db->query_read($dataman->fetch_count());
$list = mysql_fetch_object($result);
$totalcompanies = $list->count;
Any idea why this would be happening? Its driving me nuts lol
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'mydb';
mysql_select_db($dbname, $conn);
$result = mysql_query("select count(*) as count from companies");
$list = mysql_fetch_object($result);
$totalcompanies = $list->count;
echo $totalcompanies;
mysql_close($con);
When the above code is run it returns 41...
nm /sigh
My own stupidity.