I am using asp to gather details form a database but am unsure of how to go about doing what I need.
The database has columns including
id, name, address, refid
The id is a unique field to each row, the refid is a number of the id field related to that row.
For example I may have one user
1, Bob, UK, 6
And another linked to that user
2, Mr Linked, UK, 1
I will have the id of Mr Linked so can grab his refid
SELECT refid FROM t_users where id = '" & session("sessionid") & "'"
I also need to grab the name of his refid link and display on page so I would need to output 'Bob'. can I do this with the one query or would I need to grab the refid into a variable then use another query to access the database again and grab the name of 'Bob'?
The database has columns including
id, name, address, refid
The id is a unique field to each row, the refid is a number of the id field related to that row.
For example I may have one user
1, Bob, UK, 6
And another linked to that user
2, Mr Linked, UK, 1
I will have the id of Mr Linked so can grab his refid
SELECT refid FROM t_users where id = '" & session("sessionid") & "'"
I also need to grab the name of his refid link and display on page so I would need to output 'Bob'. can I do this with the one query or would I need to grab the refid into a variable then use another query to access the database again and grab the name of 'Bob'?