Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Tue Aug 16, 2005 0:08 Post subject: Self Documenting NWNX log |
|
|
Here's a little FYI that may be usefull to many... (MySQL users at least)
Try adding an in-line comment at the beginning of your SQL statements. These in-line comments are included in the NWNX logs. They do not interfere with the SQL when it is executed.
Example
SQL = "/*Comment*/ SELECT ... "
"/*" starts the comment, "*/" ends it. When MySQL parses the statement (reads the string) the comment is ignored, and the rest of the statement runs as desired.
Don't make your comment too long, as it eats into your memory buffer. But even just adding the 'script' name can help track any issues you may be getting.
A word of warning, the comment must be started and stopped (otherwise MySQL won't recognise it as a comment). and don't use any other comment method/characters as they will stop the SQL from working.
The comment could go anywhere in the statement, however putting it at the start of each line will make the log easy to read.
Hope this makes your life easier during those debug sessions 8^)
Gryphyn |
|