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
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
problem with update function - 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: problem with update function (/showthread.php?tid=137)

Pages: 1 2 3


problem with update function - mudmin - 05-23-2016

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


problem with update function - lefox - 05-23-2016

[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?


problem with update function - mudmin - 05-23-2016

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?


problem with update function - brian - 05-23-2016

That looks to be a WAMP3 error page as far as I can tell...


problem with update function - mudmin - 05-27-2016

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.