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.
Continue reading below
It has the following functions:
$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())
To use this class remember to include include the php file as in the following:
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