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: 217

Filed under:
|
|
|
|

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:

  1. Should Flash pass the member "ID" or "username" to php to process the mysql query?

  2. Is there any different passing the "id" or "username"?

  3. Which one is more secure?

  4. Which one you recommend?

I would like to optimize my website in terms of security and performance.

© Stack Overflow or respective owner

Related posts about flash

Related posts about php