+ Reply to Thread
Results 1 to 3 of 3

Thread: MySQL question

  1. #1
    stevet70 is offline x10Hosting Member stevet70 is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    35

    MySQL question

    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

  2. #2
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: MySQL question

    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.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  3. #3
    stevet70 is offline x10Hosting Member stevet70 is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    35

    Re: MySQL question

    thanks, that's perfect!

+ Reply to Thread

Similar Threads

  1. Which is better postgresql or MySQL?
    By Kurai Kumo in forum Scripts & 3rd Party Apps
    Replies: 11
    Last Post: 12-10-2009, 08:17 AM
  2. Replies: 14
    Last Post: 09-29-2008, 07:07 PM
  3. PHP MySQL Question..
    By anuj_web in forum Programming Help
    Replies: 7
    Last Post: 04-26-2008, 05:43 AM
  4. 2 questions about MySQL
    By chrisosx in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 07-06-2005, 03:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers