PHP_OOP_Database_Concepts
PHP_OOP_Database_Concepts
====================================================
PHP BASICS:
------------
1. What is PHP?
PHP (Hypertext Preprocessor) is a widely-used open-source scripting language designed for web
development.
- Platform Independent
- Server-Side Execution
Example:
<?php
?>
3. PHP Variables:
Variables in PHP start with a "$" symbol and can store data types such as strings, integers, floats,
Example:
<?php
$name = "John";
?>
====================================================
Example:
class Car {
public $brand;
public $color;
$myCar->brand = "Toyota";
$myCar->color = "Red";
echo $myCar->brand; // Output: Toyota
2. Inheritance:
Inheritance allows a class to inherit properties and methods from another class.
Example:
class Vehicle {
public $type;
return "Moving!";
public $brand;
$bike->type = "Two-wheeler";
$bike->brand = "Yamaha";
echo $bike->move(); // Output: Moving!
====================================================
DATABASE CONCEPTS:
1. What is a database?
A database is an organized collection of data that can be easily accessed, managed, and updated.
2. What is SQL?
SQL (Structured Query Language) is a standard language used to communicate with relational
databases to perform operations like querying, updating, inserting, and deleting data.