Jump to content


Photo

Add an ID Field


  • Please log in to reply
1 reply to this topic

#1 ludders

ludders
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 06 October 2005 - 08:03 PM

Hi,
I know that not having an id field is really stupid but when I first made the table I was fairly inexperienced. I was making a 'review system' for my website. I have used it for nearly a year now but I am starting to have problems. I need to add a field for the id of each review but there is already over 100 reviews on my site. How do I add an ID field into my table and find values for all the reviews so far?

I hope you can help,
Ludders

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 06 October 2005 - 08:19 PM

backup your database. after that my first guess is to use the alter table command then try 'update table set id=null'; that may auto increment them.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users