logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Error Messages

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Mon Jan 01, 2007 4:03    Post subject: Error Messages Reply with quote

Is there any way to get a little better Error Message than this?

! Error (mysql_query): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1.
_________________
Jim (aka, Urlord)
Visit the Persistent World of Nymri
Back to top
View user's profile Send private message Send e-mail
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Mon Jan 01, 2007 4:17    Post subject: Reply with quote

I have tried this on all my queries, but I am not getting anything written to the logs

Code:
SQLExecDirect(sSQL);
if(SQLFetch() == SQL_ERROR
    WriteTimestampedLogEntry(sSQL);

_________________
Jim (aka, Urlord)
Visit the Persistent World of Nymri
Back to top
View user's profile Send private message Send e-mail
Grumalg



Joined: 04 Nov 2005
Posts: 70

PostPosted: Mon Jan 01, 2007 7:51    Post subject: Reply with quote

Unfortunately the error logging modes aren't implemented yet. <sigh> I *really* miss them too Sad They would make troubleshooting so much easier if you could see the passed command and results in the log file.

--- Grumalg ---
Back to top
View user's profile Send private message
caloup



Joined: 29 Sep 2006
Posts: 59
Location: albi (france)

PostPosted: Mon Jan 01, 2007 9:36    Post subject: Reply with quote

you have forgotten a ")" :

Quote:

SQLExecDirect(sSQL);
if(SQLFetch() == SQL_ERROR)
WriteTimestampedLogEntry(sSQL);
Back to top
View user's profile Send private message
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Mon Jan 01, 2007 13:51    Post subject: Reply with quote

it's a MySQL error, so you have a bug in your sql statement, please give us the content of the "sSQL" variable
Back to top
View user's profile Send private message
Urlord



Joined: 17 Nov 2006
Posts: 122

PostPosted: Mon Jan 01, 2007 17:43    Post subject: Reply with quote

caloup wrote:
you have forgotten a ")" :

Quote:

SQLExecDirect(sSQL);
if(SQLFetch() == SQL_ERROR)
WriteTimestampedLogEntry(sSQL);


Thanks, That was just an example written after a few New Years Eve beers.

amphiprion wrote:
it's a MySQL error, so you have a bug in your sql statement, please give us the content of the "sSQL" variable


That's the problem, I don't know which statement is causing the error.
_________________
Jim (aka, Urlord)
Visit the Persistent World of Nymri
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group