Results 1 to 4 of 4
Nov 15, 2013, 07:36 #1
How to update database default value
When I start my website with a user log in system. I offer every user free 20mb data storage.
Now I want to upgrade the default value to 100mb and affect every user. How do I do that.
Here's the code:
$mysqli->query("CREATE TABLE `user` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR( 65 ) NOT NULL, `email` VARCHAR( 75 ) NOT NULL, `password` VARCHAR( 65 ) NOT NULL, ... `storage` SMALLINT NOT NULL default '20', PRIMARY KEY ( `id` ), UNIQUE ( `email` ) ) ENGINE = INNODB CHARACTER SET UTF8 COLLATE utf8_general_ci ") or die("DB error!");
Nov 15, 2013, 15:08 #2
- Join Date
- Nov 2005
- 45 Post(s)
- 0 Thread(s)
Failing that, and sorry if that was a ridiculous suggestion, I think you could set it using PHPMyAdmin too. I think you could edit the database table to add the default you want to that field.Trying to fill the unforgiving minute
with sixty seconds' worth of distance run.
Update on Sitepoint's Migration to Discourse
Nov 15, 2013, 15:44 #3
- Join Date
- Sep 2005
- Sydney, NSW, Australia
- 25 Post(s)
- 1 Thread(s)
Nov 16, 2013, 19:51 #4
Thanks for your help.
@ Shaun(OfTheDead) Any suggestion is better than never.