[PHP] Help Insert Into Mysql
#2

To set a default value:

PHP код:
ALTER TABLE `table_nameCHANGE `column_name` `column_nameTYPE DEFAULT `default_value`; 
So, for example, you want "score" to be set to 0 on default nd the table is called "users", you need to do:

PHP код:
ALTER TABLE `usersCHANGE COLUMN `score` `scoreINT DEFAULT 0
Reply


Messages In This Thread
[PHP] Help Insert Into Mysql - by Robert_Crawford - 22.08.2012, 02:39
Re: [PHP] Help Insert Into Mysql - by Sinner - 22.08.2012, 08:21
Re: [PHP] Help Insert Into Mysql - by FireCat - 22.08.2012, 08:39
Re: [PHP] Help Insert Into Mysql - by Vince - 22.08.2012, 10:29
Re: [PHP] Help Insert Into Mysql - by Sinner - 22.08.2012, 11:28

Forum Jump:


Users browsing this thread: 2 Guest(s)