Results 1 to 4 of 4

Thread: set a status on new record added to DB

  1. #1
    Join Date
    May 2012
    Posts
    216
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default set a status on new record added to DB

    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

  2. #2
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    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.

  3. #3
    Join Date
    May 2012
    Posts
    216
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    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

  4. #4
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    Quote Originally Posted by ianhaney View Post
    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.

Similar Threads

  1. error in inserting record
    By ravi951 in forum PHP
    Replies: 7
    Last Post: 08-17-2011, 07:55 PM
  2. Move to next record
    By vincentlauv in forum ASP
    Replies: 3
    Last Post: 03-10-2011, 04:59 AM
  3. Record each click
    By queerfm in forum MySQL and other databases
    Replies: 3
    Last Post: 03-21-2009, 11:56 AM
  4. PHP reload random record.
    By javrana in forum PHP
    Replies: 1
    Last Post: 02-27-2009, 04:00 PM
  5. adding record to access db
    By Mojeaux in forum JavaScript
    Replies: 0
    Last Post: 05-21-2006, 07:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •