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
/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
problem with update function
#21
I sent you an email with the entire new db class. I wonder if it went to your spam folder. Here is a link to it...

http://hastebin.com/yagitumole.coffee
  Reply
#22
[Image: Z9dLUbH.png]

thanks for getting to this so quickly. Tried your new db class and all pages are returning this error.

Something to do with the count?
  Reply
#23
That is very very weird. I will send those classes to a few others to test them out. I guess you can roll back to the original ones. I will do some more testing and let you know what I find.

What type of server are you running? WAMP/XAMPP/NGINX? What version?
  Reply
#24
That looks to be a WAMP3 error page as far as I can tell...
  Reply
#25
I am going to go through and document this better but...

Many of the methods in the DB class do not fully process the query by default. I tried to make them, but that breaks other things in the system as posted above.

When you see a method like...
Code:
public function get($table, $where){
<pre>
Code:
        return $this->action('SELECT *', $table, $where);
<code></code>    }
</pre>


The method is actually really flexible because you can tell it what you want to do with it.

So you can append
Code:
->first()
to get the first result back
Code:
->count()
to get a count of the results
Code:
->results()
to get ALL the results
Code:
->lastId()
to find out the last highest number id associated with that query (GREAT for when you insert something into the db and you need to know what id was automatically created by that query so you can immediately use it.

Again, more documentation is coming, but things like
Code:
findById
and
Code:
get
are designed to be used in conjunction with other methods in the db class.
  Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)