Should I use "id" or "unique username"?
Posted
by roa3
on Stack Overflow
See other posts from Stack Overflow
or by roa3
Published on 2009-03-26T03:17:14Z
Indexed on
2010/04/14
5:53 UTC
Read the original article
Hit count: 212
I am using PHP, AS3 and mysql.
I have a website. A flash(as3) website. The flash website store the members' information in mysql database through php. In "members" table, i have "id" as the primary key and "username" as a unique field.
Now my situation is: When flash want to display a member's profile. My questions:
Should Flash pass the member "ID" or "username" to php to process the mysql query?
Is there any different passing the "id" or "username"?
Which one is more secure?
Which one you recommend?
I would like to optimize my website in terms of security and performance.
© Stack Overflow or respective owner