0

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!

IMAGE

Just for your information it will be used so that when the value is 1 the maintenance page will be shown

4

2 に答える 2

3

OK、ここにあるのは空のテーブルで、ステータスの行があります。

まず、作成したステータス行を挿入する必要があります。PHPMyAdmin (上部の [挿入] をクリック) を使用してこれを行うか、次の SQL を使用します。

INSERT INTO gfx_maintenance(status) VALUES(0)

これで、実際に DB にデータがいくつかあります。これを変更するには、PHPMyAdmin に表示される小さな鉛筆をクリックするか、次の SQL を使用します。

UPDATE gfx_maintenance SET status=1

お役に立てれば。

于 2013-02-02T13:28:57.910 に答える
1

テーブルを確認してオプションの変更に移動すると、デフォルトのオプションが表示されます。次に、定義オプションとして選択し、目的の値を入力します

于 2013-02-02T13:33:31.920 に答える