PDF based on employee_id
NEED HELP!!!! :(
I have to finish a task in our project, lets say for example employees table has columns employee_id, username and password...
开发者_JAVA百科How will i print the username and password based on employee_id? please help me :(
This is one of the best ways to accidentally passwords and embarrass your company.
Never store passwords in plain text!
and certainly never print them out.
You should destroy your password
column and replace it with an SHA-512 hash.
To answer the question:
SELECT Username FROM employee WHERE emplyee_id = @id
What are you using? T-SQL?
First of all NEVER store/print passwords in plain text. But..
SELECT username, password FROM table ORDER BY employee_id
Or if you want to select the username for each employee individually then
SELECT username, password FROM table WHERE employee_id = @id
Where @id is the employee id number of the employee you want the information about.
精彩评论