Basic Structure of PHP

Basic Structure of PHP

The server executes the PHP script, which will send the HTML output to the browser. Normally HTML and PHP tags can be present. A popular open source general programming language, PHP or Hypertext Preprocessor may be built into an HTML. The .php extension is used to store PHP files. In PHP tags, PHP scripts and standard HTML may be written in any page.

For beginners or pros alike, PHP is a pleasant language to use. We start working with PHP in this PHP Tutorial Series on the first floor. Even more experienced developers who need refreshment are very great to start from the start. Frequently you will realize that sophisticated difficulties are often a fairly fundamental mistake. That’s what makes the fundamentals so vital. They are the foundation for building on your whole understanding of programming. So let’s start getting our hands dirty with PHP today we look at what PHP is, and the history of this some times contentious language.

Examples:-

Tagged : / / / / / /

Alter Table in MySql

In this tutorial we will see the commands which we can use to make changes in our table (as per April 2k21).

  • To add a column in an existing table:
Syntax: ALTER TABLE table_name ADD column_name DATATYPE;
  • To delete a column in an existing table:
Syntax: ALTER TABLE table_name DROP column_name;
  • To change the data type of a column in an existing table:
Syntax: ALTER TABLE table_name MODIFY COLUMN column_name NEW DATA TYPE;
  • To rename a column in an existing table:
Syntax: ALTER TABLE table_name CHANGE column_name NEW_COLUMN_NAME;
  • To update the column as NOT NULL Constraint:
Syntax: ALTER TABLE table_name MODIFY column_name DATATYPE NOT NULL;
  • To Sort the data in the Table:
Syntax: SELECT "column_name" FROM "table-name" [WHERE "condition"] ORDER BY "column_name" [ASC/DESC];

Tagged : / / / / /