Current location: Hot Scripts Forums » Programming Languages » PHP » Unique id based on other field is possible?


Unique id based on other field is possible?

Reply
  #1 (permalink)  
Old 09-08-10, 01:12 AM
anacy_nivas's Avatar
anacy_nivas anacy_nivas is offline
Newbie Coder
 
Join Date: Sep 2008
Location: coimbatore
Posts: 47
Thanks: 11
Thanked 0 Times in 0 Posts
Unique id based on other field is possible?

I have a table to save data about game players, Table like following
------------------------------------------------------------------------------------------
Id: 1 {Primary Key}
Name: ABU
Points: 20
Type: GAME1
TIME: 2:10
------------------------------------------------------------------------------------------
Id: 2 {primary Key}
Name: ABU
Points: 10
Type: GAME2
TIME: 2:30
----------------------------------------------------------------------------------------------

above table i need to set the unique id for column "Name" , but it based on column name "Type". It is possible?
Reply With Quote
  #2 (permalink)  
Old 09-09-10, 11:14 AM
Golith Golith is offline
Newbie Coder
 
Join Date: Jun 2010
Posts: 87
Thanks: 6
Thanked 1 Time in 1 Post
Quote:
above table i need to set the unique id for column "Name" , but it based on column name "Type". It is possible?
Not sure what your actually requiring ..

but if u set field : name to unique then there can only be one entry by a player with that name.. is this what u were looking for?
__________________
Its My script and I'll if I want to
www.cictradinggroup.com.au
Reply With Quote
Reply

Bookmarks


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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Redirect Script based on User Text Field skipcollege Script Requests 7 09-18-05 11:03 AM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 10:15 AM
Displaying data based on a field in a csv file Fladrif PHP 5 03-06-04 04:02 PM
Declared Functions skipper23 PHP 4 12-17-03 10:06 AM
index page not showing up skipper23 PHP 3 12-15-03 01:10 PM


All times are GMT -5. The time now is 08:20 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.