PDA

View Full Version : SQL Count error


jasharen
08 Jul 2007, 20:12
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.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Any idea why this would be happening? Its driving me nuts lol



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



When the above code is run it returns 41...

nm /sigh

My own stupidity.

analog2112
09 Jul 2007, 03:28
Are you using MySQL 5? I saw this same sort of thing when I did a "select count (*)", just for kicks try replacing the wildcard with a column name and see what you get "select count (some_column_in_companies)"

jasharen
12 Sep 2007, 05:41
In this case I was connected to two different databases. Almost carbon copies of each other, but one was hitting the *live* database and the other was hitting the development db.

All I can say is I was tired at the time lol