31 lines
1.3 KiB
Plaintext
31 lines
1.3 KiB
Plaintext
== Try It! Pulling data from other tables
|
|
|
|
The input field below is used to get data from a user by their last name. +
|
|
The table is called 'user_data':
|
|
|
|
-------------------------------------------------------
|
|
CREATE TABLE user_data (userid int not null,
|
|
first_name varchar(20),
|
|
last_name varchar(20),
|
|
cc_number varchar(30),
|
|
cc_type varchar(10),
|
|
cookie varchar(20),
|
|
login_count int);
|
|
-------------------------------------------------------
|
|
|
|
Through experimentation you found that this field is susceptible to SQL injection.
|
|
Now you want to use that knowledge to get the contents of another table. +
|
|
The table you want to pull data from is:
|
|
|
|
-------------------------------------------------------
|
|
CREATE TABLE user_system_data (userid int not null primary key,
|
|
user_name varchar(12),
|
|
password varchar(10),
|
|
cookie varchar(30));
|
|
-------------------------------------------------------
|
|
|
|
*6.a)* Retrieve all data from the table +
|
|
*6.b)* When you have figured it out.... What is Dave's password?
|
|
|
|
Note: There are multiple ways to solve this Assignment. One is by using a UNION, the other by appending
|
|
a new SQl statement. Maybe you can find both of them. |