I'm trying to combine an insert sql statement with a select statement, I successfully combined this statement:
insert into dbo.sessions (se_user) select user_id from dbo.users where username = 'bader'", badersql);
What I need now is to insert another value in the same sql statement, like this:
insert into dbo.sessions (se_user,*se_ip*) select user_id from dbo.users...
As you notice there is se_ip here in the second statement, the value will be from a text box, how can I combine it with my sql statement?