Unknown column "NAN" in "field list"

Unknown column "NAN" in "field list"

am 21.09.2006 21:31:43 von torpecool

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"

am 22.09.2006 00:36:16 von gordon

>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.

>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.

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

am 22.09.2006 22:27:02 von torpecool

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:
> >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.
>
> >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.