File tree Expand file tree Collapse file tree
2.0 PHP Server programming - Stored procedures, Transactions, and UDFs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8282if ($ stmt1 && $ stmt2 ) {
8383 sqlsrv_commit ($ conn );
8484 ?>
85- <h1> Transaction was commited </h1>
85+ <h1> Transaction was committed </h1>
8686
8787 <?php
8888} else {
Original file line number Diff line number Diff line change 2626
2727$ userToUpdate = 'Nikita ' ;
2828$ tsql = 'UPDATE TestSchema.Employees SET Location = ? WHERE Name = ? ' ;
29- $ params = ['Sweeden ' , $ userToUpdate ];
29+ $ params = ['Sweden ' , $ userToUpdate ];
3030echo ('Updating Location for user ' . $ userToUpdate . PHP_EOL );
3131
3232$ getResults = sqlsrv_query ($ conn , $ tsql , $ params );
3838echo ($ rowsAffected . ' row(s) updated: ' . PHP_EOL );
3939sqlsrv_free_stmt ($ getResults );
4040
41- // Delte Query
41+ // Delete Query
4242$ userToDelete = 'Jared ' ;
4343$ tsql = 'DELETE FROM TestSchema.Employees WHERE Name = ? ' ;
4444$ params = [$ userToDelete ];
Original file line number Diff line number Diff line change 2626
2727$ userToUpdate = 'Nikita ' ;
2828$ tsql = 'UPDATE TestSchema.Employees SET Location = ? WHERE Name = ? ' ;
29- $ params = ['Sweeden ' , $ userToUpdate ];
29+ $ params = ['Sweden ' , $ userToUpdate ];
3030echo ('Updating Location for user ' . $ userToUpdate . PHP_EOL );
3131
3232$ getResults = sqlsrv_query ($ conn , $ tsql , $ params );
3838echo ($ rowsAffected . ' row(s) updated: ' . PHP_EOL );
3939sqlsrv_free_stmt ($ getResults );
4040
41- // Delte Query
41+ // Delete Query
4242$ userToDelete = 'Jared ' ;
4343$ tsql = 'DELETE FROM TestSchema.Employees WHERE Name = ? ' ;
4444$ params = [$ userToDelete ];
Original file line number Diff line number Diff line change 2626
2727$ userToUpdate = 'Nikita ' ;
2828$ tsql = 'UPDATE TestSchema.Employees SET Location = ? WHERE Name = ? ' ;
29- $ params = ['Sweeden ' , $ userToUpdate ];
29+ $ params = ['Sweden ' , $ userToUpdate ];
3030echo ('Updating Location for user ' . $ userToUpdate . PHP_EOL );
3131
3232$ getResults = sqlsrv_query ($ conn , $ tsql , $ params );
You can’t perform that action at this time.
0 commit comments