Unknown column 'NAN' in 'field list'

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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!

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

Quoted text here. Click to load it

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.

Quoted text here. Click to load it

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


Gordon Burditt wrote:
Quoted text here. Click to load it

Site Timeline