I’m real new to MySQL I’ve managed to create a table called maintenance with a default int value of 0 and I am trying to create a button which will change this value to one.
Here is a screenshot of what I have in phpmyadmin I just need to find some php code which will change the value to one I have tried many things but none have worked!

Just for your information it will be used so that when the value is 1 the maintenance page will be shown
Ok, what you have here is an empty table, with a row for status.
First, you need to insert the status row you have just created. Either do this through PHPMyAdmin (click insert at the top), or use the following SQL
Now, you actually have some data in the DB. To change this, either click the little pencil that appears in PHPMyAdmin, or use the following SQL:
Hope this helps.