Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Web.doc
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
77.82 Кб
Скачать

What can Server Scripts Do?

  • Dynamically edit, change or add any content to a Web page

  • Respond to user queries or data submitted from HTML forms

  • Access any data or databases and return the result to a browser

  • Customize a Web page to make it more useful for individual users

  • Provide security since your server code cannot be viewed from a browser

14. What is xampp?

XAMPP stands for “X (as in “cross-platform”), Apache, MySQL, PHP, Perl” and is a “solution stack package” that installs each of those items (don’t you just love techno-jargon?).  Similarly there exists a WAMP, MAMP, and LAMP, standing for Windows, Mac, and Linux, respectively.  I believe they condense the “P” to PHP/Perl/Python because Python is additionally included in the stack, whereas it’s not in XAMPP.

15. What is dom html?

In the HTML DOM (Document Object Model), everything is a node:

  • The document itself is a document node

  • All HTML elements are element nodes

  • All HTML attributes are attribute nodes

  • Text inside HTML elements are text nodes

  • Comments are comment nodes

16. What is php?

  • PHP is an acronym for "PHP Hypertext Preprocessor"

  • PHP is a widely-used, open source scripting language

  • PHP scripts are executed on the server

  • PHP costs nothing, it is free to download and use

17. What is MySql? and What is Queries?

  • MySQL is a database system used on the web

  • MySQL is a database system that runs on a server

  • MySQL is ideal for both small and large applications

  • MySQL is very fast, reliable, and easy to use

  • MySQL supports standard SQL

  • MySQL compiles on a number of platforms

  • MySQL is free to download and use

  • MySQL is developed, distributed, and supported by Oracle Corporation

  • MySQL is named after co-founder Monty Widenius's daughter: My

Queries

A query is a question or a request.

We can query a database for specific information and have a recordset returned.

Look at the following query (using standard SQL):

SELECT LastName FROM Employees

19. Show how to create db in sql? Create a Database

The CREATE DATABASE statement is used to create a database table in MySQL.

We must add the CREATE DATABASE statement to the mysqli_query() function to execute the command.

The following example creates a database named "my_db":

<?php $con=mysqli_connect("example.com","peter","abc123");

// Check connection if (mysqli_connect_errno())   {  echo "Failed to connect to MySQL: " . mysqli_connect_error();  }

// Create database $sql="CREATE DATABASE my_db"; if (mysqli_query($con,$sql))   { echo "Database my_db created successfully"; } else {  echo "Error creating database: " . mysqli_error($con); } ?>

20. Show how to create Table in sql? The sql create table Statement

The CREATE TABLE statement is used to create a table in a database.

Tables are organized into rows and columns; and each table must have a name.

Sql create table Syntax

CREATE TABLE table_name ( column_name1 data_type(size), column_name2 data_type(size), column_name3 data_type(size), .... );

The column_name parameters specify the names of the columns of the table.

The data_type parameter specifies what type of data the column can hold (e.g. varchar, integer, decimal, date, etc.).

The size parameter specifies the maximum length of the column of the table.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]