The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Error reporting for DB queries - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Off-topic Discussions (https://userspice.com/forums/forumdisplay.php?fid=10)
+--- Thread: Error reporting for DB queries (/showthread.php?tid=231)

Pages: 1 2 3


Error reporting for DB queries - mudmin - 08-18-2017

We are pushing out an improved DB class in version 4.3 so I can add this.


Error reporting for DB queries - mudmin - 08-18-2017

@karsen

I'm at work so I don't have time to figure out what's missing, but there's something missing in your execute method.

If you get a chance, take a look at this latest db class
https://pastebin.com/Jp2EbDTw

And work in your new execute method and re-paste if you don't mind and we'll get it out there.



Error reporting for DB queries - karsen - 08-18-2017

I added it to my current DB class and it works on my end. I did modify it previously so I'll sit down soon and look at yours and mine and see what's going on.


Error reporting for DB queries - karsen - 08-18-2017

Go ahead and give this a try: https://pastebin.com/EADcshuL

I did have to substitute in my modified constructor but changed it back. Here is my constructor with a few different options than standard US, just in case one of those is throwing things off for you: https://pastebin.com/NTDVeSy9


Error reporting for DB queries - jmac - 08-19-2017

Hi @mudmin would you consider putting in the option for showing database errors during development?

This is what I have been using, i'd be interested to see how you would look at implementing either this or something similar.

Quote:$this->_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);




Error reporting for DB queries - mudmin - 08-24-2017

I have this on my list. The DB class is getting an overhaul in 4.3 so we're definitely working on this. I'll see what I can do.


Error reporting for DB queries - mudmin - 08-25-2017

I'm going to push this issue to the Alpha team. I'm not keeping up with everyone's changes and I'll ask for comments. I'll keep you posted.


Error reporting for DB queries - Katronix - 09-03-2017

Thanks @jmac & @karsen your DB.php made it much easier to figure out why nothing was happening with my app.


Error reporting for DB queries - Katronix - 09-03-2017

Can someone tell me what this error means?

array(3) {
[0]=>
string(5) "42S22"
[1]=>
int(1054)
[2]=>
string(34) "Unknown column '0' in 'field list'"
}

or how to track it down further than this? As far as I know I'm not trying to refer to anything called 0.

This is of course using the @jmac and @karsen version of the DB class.


Error reporting for DB queries - mudmin - 09-03-2017

Can you paste the query that threw the error?