Results 1 to 3 of 3
  1. #1

    Change blocks of data in by database

    I have a data base with over 20000 rows of data. I would like to change about 1000 rows of data in the table but do not know how to do this without deleting all the other table data. I was trying to use the UPDATE command but I keep getting errors. Can someone take a look at the two databases I have attached and let me know what commands to use in the new.txt database so I can upload it to my server without altering all the other data.
    In summary, Im tring to update the old.sql with the new info in new.sql without changing all the unaffected files.


    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2009
    New York

    Your update statement is incorrect. it should have the form

    UPDATE video2
    set [column_to_update1] = newValue1,
    [column_to_update2] = newValue2,
    [column_to_update3] = newValue3
    where id = [some_id]

    For example:

    UPDATE video2
    SET song = 'Roll It Gal',
    WHERE id = 46449

    You would have to create the above statement 1000 times for each row of data that you are updating.

    There are some other ways, but they may be a little more complicated, and pruned to error if not fully understood. If you are going to be doing something like this on a regular basis, with large amounts of then I can make other suggestions.

    I would post a link to the MySQL reference documents, but as a new member I don't believe I can.
    Last edited by stahightech; 10-31-2009 at 09:47 AM. Reason: Syntax Error in the solution

  3. #3
    Thanks. It's been fixed. I was able to change the format with the update command within phpadmin and just as you worked fine
    Thanks again for your help

Similar Threads

  1. Outlook blocks attachments - you can't change it.
    By zinet in forum Web Hosting Lounge
    Replies: 14
    Last Post: 01-07-2007, 11:46 PM
  2. How to change user database ??
    By X-x-X in forum Hosting Security and Technology
    Replies: 4
    Last Post: 09-17-2006, 11:36 AM
  3. Change mysql database to old version
    By MoonTamil in forum Hosting Security and Technology
    Replies: 6
    Last Post: 05-31-2006, 06:19 PM
  4. [PHP] show me an example - read database and insert data to another database
    By Georgecooldude in forum Programming Discussion
    Replies: 9
    Last Post: 09-23-2004, 11:04 AM
  5. How can I change my data at Whois database?
    By sm2002 in forum Web Hosting
    Replies: 1
    Last Post: 05-15-2002, 10:36 AM

Posting Permissions

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