08-18-2017, 11:38 AM
We are pushing out an improved DB class in version 4.3 so I can add this.
The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Error reporting for DB queries
|
08-18-2017, 11:38 AM
We are pushing out an improved DB class in version 4.3 so I can add this.
08-18-2017, 03:01 PM
@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.
08-18-2017, 05:09 PM
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.
08-18-2017, 07:06 PM
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
08-19-2017, 04:34 AM
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);
08-24-2017, 10:21 AM
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.
08-25-2017, 12:14 PM
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.
09-03-2017, 03:13 AM
Thanks @jmac & @karsen your DB.php made it much easier to figure out why nothing was happening with my app.
09-03-2017, 03:32 AM
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.
09-03-2017, 12:47 PM
Can you paste the query that threw the error?
|