Re: NULL VALUE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Norland, Martin wrote:
-----Original Message-----
From: Jochem Maas [mailto:jochem@xxxxxxxxxxxxx] Sent: Monday, January 03, 2005 12:16 PM
Subject: Re: NULL VALUE


LightBulbMoment (tm): 5 seconds of searching on the MYSQL site tells

me


STATUS is a keyword. try either renaming your field or using backticks


to escape the name e.g.:


http://dev.mysql.com/doc/mysql/en/Reserved_words.html doesn't list
status, although I am familiar with its various forms e.g. "show
status".

I didn't even go as far looking there.... I made the assumption that mysql was crapping out on 'STATUS' because of its use in 'SHOW STATUS' query (and the like) - also its hard to determine whats going wrong with someones setup when you have no idea what version of stuff they are running - bare in mind we assume the chap (Matthew Perry) in question is using MySQL but he did not state this so that may be incorrect.


at any rate dumping the output of mysql_error() or mysqli_error() would probably have saved him an email to this list. ;-)


You're probably right, but I don't exactly see this as a 'clearly documented'. Still, backticking all field names is a good idea anyway.

I didn't mean to say it was clearly documented (IMHO reading & understanding documentation is one of the hardest parts of programming!) but it took me exactly 5 seconds to determine with a 95% certainty that
'STATUS' was causing his query to crap out.


HINT TO 'BEGINNERS':
1. give background to your problem. (context, software versions etc)
2. show that you have taken the time to research it.
3. google on how to successfully pose a question on a mailing list - there are a number of very explicit essays on the subject!
4. don't give up, we have all struggled for hours/days/weeks on the tiniest of problems.
5. don't assume somebody will do it for you if you can't be bothered!
6. expect the occasional RTFM, even when you're doing everything right


;-)

Builds character.

:-)


Cheers,

- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.



-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux