Web Design Forums

PHP

Have questions about PHP? Ask them here and our experts will assist you before you know it! You can also find help in the documentation at PHP.net.

Need modifications to an existing table



Site of the Month Nominations
ENTER YOUR SITE NOW!

Reply
 
LinkBack Thread Tools
Old January 19 '10, 12:18 PM (#1)
asdfghjkl is offline
Account Closed
 
asdfghjkl's Avatar
 
Join Date: January 2010
Posts: 4
asdfghjkl is an unknown quantity at this point
Need modifications to an existing table

Hi everyone. I'm very new to mysql and php, learning as I go. Working on a database which has a problematic design oversight. The primary key is a combination of two fields, on the assumption that these fields would never be the same, but that is not the case as I find the need to create multiple records with identical values in these fields

So I want to alter this table, to add a new AUTO INCREMENT column, and change the primary key to that. The table currently has just under 10,000 records in it which are valuable, so I can't afford to mess this up. Can anyone advise as to what I should do? I'd assume the ALTER query will be needed.

Thank you in advance for replies
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 19 '10, 04:17 PM (#2)
mlseim is offline
WDF Staff
 
mlseim's Avatar
 
Join Date: April 2004
Location: Cottage Grove, Minnesota
Posts: 3,401
mlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud of
Do you have access to the MySQL admin control panel?

With that, you can make a safe backup to begin with ...
then add the new column with the variable parameters you want.
It will automatically number them all in order ... unique numbers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 19 '10, 11:24 PM (#3)
asdfghjkl is offline
Account Closed
 
asdfghjkl's Avatar
 
Join Date: January 2010
Posts: 4
asdfghjkl is an unknown quantity at this point
Thanks Mr. Mlseim. Very good your advise, may be its useful for me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  Web Design Forums » Programming Help » PHP

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE and Myspace Css Issues :( pleaseee help Gabriella HTML and CSS Help 5 October 31 '09 04:05 PM
ugh please help me, myspace layout css div overlay comments messup CSM Pickard HTML and CSS Help 4 July 14 '09 11:23 PM
Need someone who is great at Firexo/IE CSS discrepency issues... kennedrw HTML and CSS Help 1 November 14 '07 03:21 AM
My funky shoe database, part 2 TheGardener PHP 4 October 17 '07 12:24 AM
adding a row into an existing table kdog316 PHP 6 May 8 '03 04:49 PM

 
User Infomation
Your Avatar

Site Of The Month

Ticket Cake
Ticket Cake

Ticket Cake is a drupal based event ticketing platform. It features that ability to browse events and share them.

Nominate Your Site Now!

Advertisement
WolfCMS.org

Latest Articles
- by RickM
- by bfsog

Advertisement

Partner Links



All times are GMT -4. The time now is 02:45 AM.


WebDesignForums.net is Copyright © 2010 RikeMedia.

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163