The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error reporting for DB queries
#11
We are pushing out an improved DB class in version 4.3 so I can add this.
  Reply
#12
@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.
  Reply
#13
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.
  Reply
#14
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
  Reply
#15
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);

  Reply
#16
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.
  Reply
#17
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.
  Reply
#18
Thanks @jmac & @karsen your DB.php made it much easier to figure out why nothing was happening with my app.
  Reply
#19
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.
  Reply
#20
Can you paste the query that threw the error?
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)