Proposing SQL Statement Coverage Metrics: Difference between revisions
Programsam (talk | contribs) |
Programsam (talk | contribs) |
||
| Line 54: | Line 54: | ||
setcookie(“userrole”, $role); | setcookie(“userrole”, $role); | ||
</code> | </code> | ||
<center>'''Figure 4. Example authentication code'''</ | <center>'''Figure 4. Example authentication code'''</center> | ||
The code in Figure 4 performs the following. First, query the database for every entry with the entered username and password. Typically, we use the first row of returned SQL results (which is retrieved by mysql_fetch_array and stored in $firstresult) because the web application (or the database management system) | The code in Figure 4 performs the following. First, query the database for every entry with the entered username and password. Typically, we use the first row of returned SQL results (which is retrieved by mysql_fetch_array and stored in $firstresult) because the web application (or the database management system) | ||