GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/MichaelMalz/CST1602/Labs/Lab08/ |
Upload File : |
<? // JimMartinson/CST1602/Labs/Lab05/index.php $TRACK = "<b>".basename(__FILE__).'</b> <span class="pv_fl">('.__FILE__.")</span>\n<ol>\n"; ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path. require('application.phpinc'); require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced. $disabled = ''; $disabled = 'disabled'; // Comment this line to enable lab. ?> <fieldset><legend>Description</legend> The purpose of this lab is to demonstrate your ability to create a procedure that uses RESIGNAL and functions. <?=$gradeNote?> <? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?> </fieldset> <fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> Assignment</legend> <ol class="count"> <li> Create a directory called <b class="copyText"><?=$evaluationName?></b> inside of your <b><?=$courseNumber?>\Labs</b> folder. We will use it for all work performed in this lab. </li> <li> Write a script that does the following: <ol> <li>Uses the <b>classicmodels</b> database.</li> <li>Ensure the <b>GetFullName()</b> procedure is removed if it exists.</li> <li>Create a procedure named <b><span class="copyText">GetFullName</span>()</b> that does the following: <ol> <li>Takes three parameters: <ul> <li><span class="copyText">IN firstName VARCHAR(16)</span></li> <li><span class="copyText">IN lastName VARCHAR(32)</span></li> <li><span class="copyText">OUT fullName VARCHAR(48)</span></li> </ul> </li> <li>Uses both <b>RESIGNAL</b> and <b>SIGNAL</b> to disply the error <b>'No first name was given.'</b> if the firstName in the call is an empty string.</li> <li>Returns a fullname surrounded by [] (square brackets).</li> </ol> </li> </ol> </li> <li>Save the <b>GetFullName()</b> procedure as <b class="copyText"><?=$saveFilename?>-GetFullName_proc.sql</b> in the <b><?=$evaluationName?></b> folder.</li> <li> Open a new query and run the following two SQL statements: <br><code class="copyText">GetFullName('<?=$userFirstName?>', '<?=$userLastName?>', @FullName); <br>SELECT @FullName;</code> <br>The result should be: <b>[<?=$userFirstName?> <?=$userLastName?>]</b>. <br>Make sure the Result Grid and Output panes are visible. </li> <li>Take a screenshot and save it as <b class="copyText"><?=$saveFilename?>-a.png</b> in your <b><?=$evaluationName?></b> folder. <? showBegin('See example screenshot','Hide example screenshot'); ?><br><img src="JimMartinson-Lab05-a.png" width="1004" height="601" alt="<?=$saveFilename?>-a.png"/><br><? showEnd(); ?> </li> <li> Open a new query and run the following two SQL statements: <br><code class="copyText">GetFullName('<?=$userFirstName?>', '', @FullName); <br>SELECT @FullName;</code> <br>The result should be: <b>[<?=$userFirstName?>]</b>. <span class="note">There is no space after the first name if the last name is an empty string.</span>. <br>Make sure the Result Grid and Output panes are visible. </li> <li>Take a screenshot and save it as <b class="copyText"><?=$saveFilename?>-b.png</b> in your <b><?=$evaluationName?></b> folder. <? showBegin('See example screenshot','Hide example screenshot'); ?><br><img src="JimMartinson-Lab05-b.png" width="1004" height="601" alt="<?=$saveFilename?>-b.png"/><br><? showEnd(); ?> </li> <li> Open a new query and run the following two SQL statements: <br><code class="copyText">GetFullName('', '<?=$userLastName?>', @FullName); <br>SELECT @FullName;</code> <br>Should return the error: <b>Error Code: 1644. No first name was given.</b> <br>Make sure the Output pane is visible. </li> <li>Take a screenshot and save it as <b class="copyText"><?=$saveFilename?>-c.png</b> in your <b><?=$evaluationName?></b> folder. <? showBegin('See example screenshot','Hide example screenshot'); ?><br><img src="JimMartinson-Lab05-c.png" width="1255" height="751" alt="<?=$saveFilename?>-c.png"/><br><? showEnd(); ?> </li> <li>Turn in your assignment: <ol type="a"> <li>Make sure the following files are in your <b><?=$evaluationName?></b> folder: <ol type="a"> <li><?=$saveFilename?>-a.png.</li> <li><?=$saveFilename?>-b.png.</li> <li><?=$saveFilename?>-c.png.</li> <li><?=$saveFilename?>-GetFullName_proc.sql.</li> </ol> </li> <li>Zip up your <b><?=$evaluationName?></b> folder into a file named <b class="copyText"><?=$uploadFilename?></b>.</li> <li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload" id="inpFileUpload"<?=$disabled?>><div id="divFileploadError"></div></li> <li>Then <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<?=$disabled?>> for grading.</li> </ol> </li> </ol><? if ( $disabled ) { ?> <span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><br> <? } ?> <?=$gradeNote?> </fieldset> <? require('Gradebook/EvaluationSubmission_END.phpinc'); // Replaced. #require('../../ReferencesResources.phpinc'); #require('JimMartinson/ContactInformation.phpinc'); require('common/pageFooter.phpinc'); if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n"; ?>