Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5.6 Figure 5.14 shows a fragment of code that implements the login functionality for a database application. The code dynamically builds an SQL query and
5.6 Figure 5.14 shows a fragment of code that implements the login functionality for a database application. The code dynamically builds an SQL query and submits it to a database 1. String login, password, pin, query 2. login= getParameter ("login 3. password- getParameter ("pass") 3. pin getParameter ("pin") ; 4. Connect!n conn .createC nnection ("MyDataBase") 5. query"SELECT accounts FROM users WHERE login-" login + "'AND pass = '" + password + " 'AND pin-"+ pin; 8. Resultset result-conn.executeQuery (query) 9. if (result !=NULL) 10 11 else 12 displayAccounts (result): displayAuthFailed (); Figure 5.14 Code for Generating an SQL Query a Suppose a user submits login, password, and pin as doe, secret, and 123. Show the SQL query that is generated b. Instead, the user submits for the login field the following or 1 1 What is the effect
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started