Page 357 - Computer Software Application TP - Volume 1
P. 357

COMPUTER SOFTWARE APPLICATION - CITS




           1  Write the PHP code to establish a connection from a MySQL database named my_database hosted on
              localhost, using a username and a password.
           2  Write the PHP code to connect to the database, execute a query to retrieve data from a table named users,
              and then display the results on a webpage.
           3  Write PHP code to connect to the database, insert a new product record with specific values in to a table
              named products and handle any potential errors during the insertion process.
           4  Write PHP code to connect to the database, update existing records in a MySQL database table named
              orders. update specific order records with new values, and ensure that the updates are applied successfully.
           5  Write PHP code to connect to the database, delete specific customer records based on certain criteria from
              a MySQL database table named customers.







































































                                                           342

                               CITS : IT & ITES - Computer Software Application - Exercise 61
   352   353   354   355   356   357   358   359   360   361   362