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-22-2016

I would say go straight to UserSpice 4.1 full and see what happens. I will tinker with the get function as soon as I get the 4.1 info on the site. Enjoy GOT.

http://userspice.org/?smd_process_download=1&downlhttp://userspice.org/?smd_process_download=1&download_id=1385


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

Link not working! Is this the same one on the download page?


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

is the alpha posted in the forums the same as the first download on the download page? I just got the one off the forum and the side nav is working perfectly!


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

Oops Yeah. Bad copy/paste on my part. It's http://userspice.org/?smd_process_download=1&download_id=1385 or the one on the homepage.


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

fixed the nav problem, took about 5 minutes to integrate all the features I had created. Well done, sir!


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

Glad it worked. Thanks for sticking with us! I'm about to take a look at the get method now.


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

I created a test to see if the $db->get is losing stuff for me. I see what you're talking about. I did...
Code:
$user1 = $db->get('users',array('id','=',1));
Code:
$user2 = $db->get('users',array('id','=',2));
Code:
dump($user1);
Code:
dump($user2);
and I get the results for user 2 twice. It must be how it's storing it in memory. Let me check on this.


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

Ok. I figured out that the findById method works for your situation and is a little simpler. Try this

Code:
$league = $db->findById($leagueKey,'leagues');
and
Code:
$player = $db->findById($playKey,'player');

See if that works.


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

Ok. There is a team of people working on this. We realized that both the get and findById methods (by design) only run the query, but do not return results on their own. To use my method above, you'll have to make one change to the db class. I'll push this out on an update (and probably fix your join issue too. In classes/db.php you have to add the ->first() to the end of this line. That will fix your problem.

Code:
public function findById($id,$table){
Code:
return $this->action('SELECT *',$table,array('id','=',$id))->first();
Code:
}

A new and improved get function is coming. I'll document that too.


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

should i add this to get too?