Thread: Error messages
View Single Post
  #4 (permalink)  
Old June 5th, 2005, 07:12 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Yeah, it makes sense, and it is possible as well.

However, you shouldn't rely on the database preventing duplicate records. The procedure that tries to insert the first record, should first check whether there is already a record for the user. If there is no record yet, insert one, otherwise simply do nothing.

You can't have a variable in your code connected to the database directly. However, whenever the user chooses a new style sheet you should fire some update code that updates the style sheet for the user in the database.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote