MySQL Forums
Forum List  »  Quality Assurance

Descrepency between query browser and odbc results
Posted by: Mark Olivo
Date: June 12, 2008 01:34PM

I am working with a database where customer registrations are alloted by times. There is a seperate hour and minute column for each registration. There can be up to 20 registrations every 15 minutes and the system rolls up to the next block as it fills up.

The data in the system is:
wregid | wwreghour | wwregmin
1 | 8 | 0
2 | 8 | 0
3 | 8 | 0
4 | 8 | 0
5 | 12 | 0
6 | 12 | 0

I need to get a count list of all registrations grouped by their times. I used this code in the query browser and got the intended results

"SELECT count(*) as numrows, wrreghour, wrregmin FROM [tablename] group by wrreghour, wrregmin;"

numrows | wwreghour | wwregmin
4 | 8 | 0
2 | 12 | 0

However when I used that exact same code in my web page I did not get even close to the same results. The results were not even relevant to the data that existed in the database to begin with. The returned results were:

numrows | wwreghour | wwregmin
1 8 0
1 8 15
1 8 30
1 8 45
1 9 0
1 9 15
1 9 30
1 9 45

We are using Legacy ASP 2.0, Mysql 4.1.11-nt, and the MySQL ODBC 3.51 connection driver. I get the exact intended results using the query browser but not when using the same code on the website. I can only assume this is an issue between the ODBC driver and ASP but we have been using this exact setup for the past two years and have yet to see anything like this before.

Thank you for your help in advance.



Edited 2 time(s). Last edit at 06/12/2008 01:43PM by Mark Olivo.

Options: ReplyQuote


Subject
Views
Written By
Posted
Descrepency between query browser and odbc results
2849
June 12, 2008 01:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.