Connecting Tech Pros Worldwide Forums | Help | Site Map

Unknown column 'NAN' in 'field list'

torpecool@yahoo.com
Guest
 
Posts: n/a
#1: Sep 21 '06
Hello Everyone,

I just ran into this issue, and I am hoping that some of you may be
able to help.

I am developing a web-based PHP application with a MySQL back-end. I
have a testing and a production environment. The only discernable
difference between the two is that the testing environment runs MySQL
4.1.14 and the production environment runs 5.0.2.

I made some modifications to an upload page (with just a bunch of
instert statements) today. It works flawlessly on the testing system
but when I push it out to production, I get this error message:

Unknown column 'NAN' in 'field list'

Any ideas?

I expect some of you would suggest that I upgrade my testing
environment so that it matches production. Although I could do this,
in this case the application may give me this error on both systems and
I would be no closer to the solution.

I would certainly apprecaite any help you may be able to offer.

Thank you!


Gordon Burditt
Guest
 
Posts: n/a
#2: Sep 21 '06

re: Unknown column 'NAN' in 'field list'


>I just ran into this issue, and I am hoping that some of you may be
Quote:
>able to help.
>
>I am developing a web-based PHP application with a MySQL back-end. I
>have a testing and a production environment. The only discernable
>difference between the two is that the testing environment runs MySQL
>4.1.14 and the production environment runs 5.0.2.
>
>I made some modifications to an upload page (with just a bunch of
>instert statements) today. It works flawlessly on the testing system
>but when I push it out to production, I get this error message:
>
>Unknown column 'NAN' in 'field list'
Is there SUPPOSED to be a column named 'NAN'?

Log queries at the server. Search the queries for the string 'NAN'
around the time you get the error. With low activity on the server,
a "tail -f" on the log file running in one session while you recreate the
problem in another may be enough to spot the problem. Then figure
out what is generating the incorrect query.
Quote:
>I expect some of you would suggest that I upgrade my testing
>environment so that it matches production. Although I could do this,
>in this case the application may give me this error on both systems and
>I would be no closer to the solution.

torpecool@yahoo.com
Guest
 
Posts: n/a
#3: Sep 22 '06

re: Unknown column 'NAN' in 'field list'


Thanks for the suggestion.

No, the column was not supposed to be called "NAN". After a solid day
of research I found that NAN in PHP stands for "Not A Number". My
query was trying to insert the result of a function which was failing
for some unrelated reasons. So my suspision about the error
originating from the differing database version on the testing and
production systems was not correct.

Sorry to waste the forum's time with what turned out to be a non-mysql
issue.

Thanks!


Gordon Burditt wrote:
Quote:
Quote:
I just ran into this issue, and I am hoping that some of you may be
able to help.

I am developing a web-based PHP application with a MySQL back-end. I
have a testing and a production environment. The only discernable
difference between the two is that the testing environment runs MySQL
4.1.14 and the production environment runs 5.0.2.

I made some modifications to an upload page (with just a bunch of
instert statements) today. It works flawlessly on the testing system
but when I push it out to production, I get this error message:

Unknown column 'NAN' in 'field list'
>
Is there SUPPOSED to be a column named 'NAN'?
>
Log queries at the server. Search the queries for the string 'NAN'
around the time you get the error. With low activity on the server,
a "tail -f" on the log file running in one session while you recreate the
problem in another may be enough to spot the problem. Then figure
out what is generating the incorrect query.
>
Quote:
I expect some of you would suggest that I upgrade my testing
environment so that it matches production. Although I could do this,
in this case the application may give me this error on both systems and
I would be no closer to the solution.
Closed Thread