View Issue Details

IDProjectCategoryView StatusLast Update
0007886New Feature RequestsGeneralpublic2017-06-18 20:56
ReporterTosfera Assigned To 
Status newResolutionopen 
PlatformWindowOSwindows 7 
Summary0007886: [Request] db* functions to have an error request

the mysql module does have a mysql_error, which is great for logging. The dbQuery does not have this function, this will automaticly be saved in "logs/db.txt".

I'd like to safe them in another place, creating a new function ( dbError, or something like that ) that would return the latest error that has been returned if the query failed, that would be awesome.

right now you've to select the latest row of the db.txt and copy it into another file, quite a work around. It still is a messy way of doing stuff.

TagsNo tags attached.



2013-10-29 09:34

administrator   ~~0019580

Last edited: 2013-10-29 09:36

View 2 revisions

dbPoll returns error number and message in a failed query.


However it might be useful to add that for dbExec.


2013-10-30 01:45

administrator   ~~0019583

The mysql module only processes one query at a time. The db functions can processes several queries at once, which would make a last error function unreliable.

You could use dbPoll as suggested by sbx320. Or we could add an event for errors.

Can you explain exactly what you are going to do with the error messages ?


2015-01-13 17:18

viewer   ~~0022859

Sorry for the late answer, I would like to have a clear error reporting for my fellow administrators. They aren't programmers at all and the control of your scripts is increased by the control of your queries. I'm currently using the mysql module which is outdated and discontinued but still with the right steps, able to use. I don't want to risk my entire server on outdated modules so I would love to have a better error reporting for the queries.


2015-01-13 17:41

administrator   ~~0022860

Last edited: 2015-01-14 20:14

View 2 revisions

I think an onDatabaseQueryError event is appropriate, i'll try and work on a patch for this.


2015-01-13 18:34

viewer   ~~0022862

That would be lovely qaisjp! I was planning on doing it myself but my knowledge isn't that good in c++ yet, can't wait to see it! :)

Issue History

Date Modified Username Field Change