How to update data?
<?php
# Including MySQLm [See https://github.com/AtjonTV/MySQLm/wiki/1.-Getting-Started or https://atjontv.github.io/MySQLm/starting.html]
include 'https://raw.githubusercontent.com/AtjonTV/MySQLm/dev-1.5/src/MySQLm.php';
# Creating MySQLm Object with direct connect [ See https://github.com/AtjonTV/MySQLm/wiki/2-Connecting or https://atjontv.github.io/MySQLm/db-connecting.html]
$msql = new MySQLm("database-server.com", 3306, "myusername", "userspassword", "databasename", "charset");
/* For this showcase/tutorial/wiki, i will use the w3schools php&&sql tutorial
If you want to see the original you can visit:
https://www.w3schools.com/php/php_mysql_create_table.asp
This tutorial wont show the commands from the last tutorial,
i only change the database.
*/
// As seen in tutorial 4 [https://github.com/AtjonTV/MySQLm/wiki/4-Create or https://atjontv.github.io/MySQLm/db-creating.html] were we created a database,
// we now need to use it, and to do so we need to use an execute.
// As seen in tutorial 3 [https://github.com/AtjonTV/MySQLm/wiki/3-Chaning-Database or https://atjontv.github.io/MySQLm/db-changing.html] we will use executeUse
$msql->executeUse("ShowCaseDatabase");
// But what if we want to change a value in the table, like the email?
// We need a Update! [Tutorial here: https://www.w3schools.com/php/php_mysql_update.asp]
# To keep it overviewable, lets use a query string again
$query = "MyGuests SET email='john.doe@example.net' WHERE id=1";
# Lets execute the Update (The Update keyword gets automaticly set before the query we give)
$msql->executeUpdate($query);
$msql->dispose("acc", "x");
?>