fert Posted October 16, 2006 Share Posted October 16, 2006 How do you create a new varible in an existing row? Quote Link to comment https://forums.phpfreaks.com/topic/24060-how-do-you-create-a-new-varible/ Share on other sites More sharing options...
effigy Posted October 16, 2006 Share Posted October 16, 2006 I don't understand. Do you mean a @variable? or perhaps a field? (alter table...) Quote Link to comment https://forums.phpfreaks.com/topic/24060-how-do-you-create-a-new-varible/#findComment-109527 Share on other sites More sharing options...
fert Posted October 16, 2006 Author Share Posted October 16, 2006 [quote author=effigy link=topic=111616.msg452609#msg452609 date=1161008578]a field? (alter table...)[/quote]I mean a field Quote Link to comment https://forums.phpfreaks.com/topic/24060-how-do-you-create-a-new-varible/#findComment-109613 Share on other sites More sharing options...
a2bardeals Posted October 17, 2006 Share Posted October 17, 2006 ALTER TABLE `YOUR_TABLE_NAME` ADD `YOUR_FIELD_NAME` YOUR_FEILD_TYPE NOT NULL ; a field type is like text (TEXT) or integer (INT).more field typeshttp://dev.mysql.com/doc/refman/4.1/en/data-types.htmlif you want just a normal string variable like a 'username' and your table is named 'table1' your query might look like: ALTER TABLE `table1` ADD `username` TEXT NOT NULL Quote Link to comment https://forums.phpfreaks.com/topic/24060-how-do-you-create-a-new-varible/#findComment-109811 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.