Subscribe
Subscribe now and you will be updated for any news about the IoT word
Every developer has been asked many time to retrieve or modify information from a database, most of the case the database is MySQL. For this reason I have created a class that use everytime I have to manage a database. In particular this class has two main files, the first one contains only constant and they are the useful constants that you need to use the database. You have to fill this file with your informations. The second file is the class, this class creates the elements you need to interface with the database. It has the following functions: To use this class remember to include include the php file as in the following:
$id = $database->insert(DBTABLE_NAME,fields array(),values array());
$array_data = $database->select(DBTABLE_NAME,fields array(), array(" WHERE field=\"value_field\""))
$result = $database->update(DBTABLE_NAME,fields array(),values array(),array(" WHERE field=field_value"))
$result = $database->delete(DBTABLE_NAME,fields array(),values array())
include_once("config.php");
include_once("databaseManager.php");
$database = new DatabaseManager();
Subscribe now and you will be updated for any news about the IoT word