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
I always get a little worried...
#4
Thanks for the feedback on that. Yeah...my main reason for using wordpress for the UserSpice.com was that I wanted to spend my time coding UserSpice and not forums, etc. Plus, when I first started, it was simply fixing a few security vulnerabilities for UserCake and served as a bridge to later development.

I am going to launch a live demo with UserSpice 4.

It's interesting that you said you didn't want to go full OOP with your project. I just added kind of an an interesting crutch to UserSpice 4. It gives you two cool things.

1. You can query the database using OOP, but the syntax is your regular old sql syntax, like this.
Code:
$db = DB::getInstance();
Code:
$query = $db->query("SELECT id, name FROM permissions");
Code:
$results = $query->results();

2. The second bit of magic comes with that last line. If you run that as listed above, you'll return an object, or an array of objects. However, if you put
Code:
$results = $query->results(true);
The entire query will switch to a FETCH_ASSOC which will bring you back a good old-fashioned array or an array of arrays so you don't have to have the rest of your project in an OOP style if you don't want to, but you get all the benefits of PDO.

Finally, the best part is that you can use your own classes and methods to access the database to do your own project and just use mine for the UserSpice portion...and of course, it's fine to make your own queries for the users if you want to add functionality.

Just figured I'd update you. Please let me know any issues you run into.
  Reply


Messages In This Thread
I always get a little worried... - by supertony - 12-10-2015, 10:38 AM
I always get a little worried... - by mudmin - 12-10-2015, 03:29 PM
I always get a little worried... - by astropos - 01-20-2016, 10:47 PM
I always get a little worried... - by mudmin - 01-20-2016, 11:00 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)