Skip to content

PHP usort won’t sort class

This is a sample of the array of elemnts to sort: $items = array 0 => object(stdClass)[8] public ‘id’ => string ‘110’ (length=3) public ‘brand_id’ => …

Fetch data from MySQL using OOP

I’m a beginner in OOP PHP. I’m trying to make a class that will connect,query and fetch data I done the below coding class MySQL { private $set_host; private $set_username; private $…

MySQLi PHP Extension Problems

Whenever a query finishes executing, I know you should free the result. Here is a snippet of a class I built for running a simple query. Could someone tell me where I went wrong? The query, when entered properly, runs successfully. It’s just that my page doesn’t reload like it, should but it gives…