Question
Create a database table? CAN U help me creating a new table in the database? So far the code has used the existing database table
Create a database table? CAN U help me creating a new table in the database?
So far the code has used the existing database table called tt284_guests, but that has no provision for a booking reference field. You will now create a new table in your database. Examine the file table-manager.php Notice the variable $database_table which must be set to the name of your new table required. You will create a table called tt284_oucu. (Where oucu is replaced with you own OUCU). Your new table will contain all the columns which exist in tt284_guests, with the addition of the new booking reference column. Base your answer closely on the existing SQL statement. The booking reference field may contain up to 10 characters. Modify the SQL statement in the $create_sql variable to meet these requirements. Remember that column names cannot contain spaces, so you must choose a suitable name. Once you are happy with your SQL, open table-manager.php on the TT284 server and click the create button to execute the SQL to create the table. Once a table is created it cannot be modified, so if you create a table with the incorrect structure, you must delete it before you can create a corrected version. This can be done using the drop button when executing table-manager.php.
38
TT284 Block 2 - Table manager
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 EThe following tables currently exist:
'; 180 181 182 echo '- '; // Loop through each value in Stables foreach ($tables as $table) { echo '
- ' . _x ($table) . '; - } echo '
Table " _x ($database_table). } else { echo 'Table " x ($database table). echo ''; // Loop through each value in $columns foreach ($columns as column) { echo '- ' . _x($column) . '
'; } echo '
'; } // Finally present a form with buttons to execute the SQL echo 'Create or drop" _x ($database_table). "":
'; - ?> 203
- '; // Loop through each value in $columns foreach ($columns as column) { echo '
- ' . _x($column) . ' '; } echo '
Create or drop" _x ($database_table). "":
'; - ?> 203If you need to change this SQL, edit then click: ">reload the page.
I 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 LID - - 38TT284 Block 2 - Table manager
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 EThe following tables currently exist:
'; 180 181 182 echo '- '; // Loop through each value in Stables foreach ($tables as $table) { echo '
- ' . _x ($table) . '; - } echo '
Table " _x ($database_table). } else { echo 'Table " x ($database table). echo ''; // Loop through each value in $columns foreach ($columns as column) { echo '- ' . _x($column) . '
'; } echo '
'; } // Finally present a form with buttons to execute the SQL echo 'Create or drop" _x ($database_table). "":
'; - ?> 203
- '; // Loop through each value in $columns foreach ($columns as column) { echo '
- ' . _x($column) . ' '; } echo '
Create or drop" _x ($database_table). "":
'; - ?> 203If you need to change this SQL, edit then click: ">reload the page.
I 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 LID - -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