PDA

View Full Version : set a status on new record added to DB



ianhaney
02-18-2017, 07:47 PM
Hi

Is it possible to set a default status of Potential to each new record that is added to a database and if anyone could help me do it please as I have tried looking it up on Google but can't seem to find anything similar to what I am looking to do

Thank you in advance

styxlawyer
02-18-2017, 09:39 PM
Yes, just add another field to your records to store the status. It can either be plain text or a number. The advantage of a plain text field is that is is readable, but changing the text later means a lot of editing. A numerical field can easily be interpreted to text when reading the records and that text can easily be changed if the chosen words don't suit in the future.

If you are past the stage where you can add a field to the records, then you will have to create a new table using the record ID and status and relate it back to the original.

ianhaney
02-19-2017, 09:29 AM
I have already got the new column created, I had a look on Google and it says about alter table and DEFAULT, I looked at mysql set default

styxlawyer
02-19-2017, 01:29 PM
I have already got the new column created, I had a look on Google and it says about alter table and DEFAULT, I looked at mysql set default

Sorry , but that post is totally meaningless to me.