DEV Community

littlephone
littlephone

Posted on • Originally published at labstry.com

1 1

Labfroum is switching to Medoo from PDO Connection

GitHub logo labstry-opensource / labforum

A lightweight, open source PHP based forum engin. This is a mirror. Checkout https://gitlab.com/labstry/labstry_forum

😽 Let's become a CAT 😽

Starting from Labforum 3.1, we are switching to Medoo.

Being based on PDO for about 3 years, we are now moving on to switch to Medoo, a cross DB solution for PHP. That means the code underlying Labforum, currently only works on MySQL or mariaDB, is about to receive cross db platform support.
Starting from version 3.1, you can use Labforum on a SQL Server db, or an Oracle DB. All up to you.

Introducing additional paging system
Switching to Medoo library means cross platform limit is handled. We will add pagination the program. You can expect a better paging system used in frontend.

What it means to you
Since Medoo is an additional library, you custom code will still works on MySQL database installation if it involves custom database queries.
However, we suggest you to move on using Medoo to query db as it will not work for installation with other DBs.

Transitional Period
Starting from 3.0.5 , we are transitioning to Medoo in our core code.
You will see two versions of connection at the same time. $connection variable is reserved for Medoo, $pdoconnection is the variable we are currently used for PDO DB connection. If you use global $connection variable, you'll receive a Medoo object. Use Medoo->pdo to get back PDO object.
However, we don't recommend using PDO as it broke the compatibility for different DBs.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay