MySQL question

stevet70

New Member
Messages
35
Reaction score
0
Points
0
Is it possible to insert a new field into a table (using either PHP or going through phpMyAdmin) that will automatically have a word in it for each record - without needing to edit each record as there's over 1500?

Doesn't really matter what the word is, can be 'yes' for example, just needs to be something I can use in a SELECT statement.

The idea is that it'll be used like a select all for a subscriptions database, but over time if people unsubscribe the 'yes' becomes a 'no' rather than records being deleted. Obviously deleting the records would be easier and avoid me needing to know how to do this, but because of the way the database table syncs with FileMaker I've been asked not to delete records.

thanks for any advice
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
Yes, you can do this easily in PHPMyAdmin. Select the table you want, go to structure, add a row, and set the default value. You can also use the ALTER TABLE sql command with a DEFAULT statement and it will do the same thing.
 
Top