<?php $age = 20 ; $age1 = 25 ; if ( $age >= 18 && $age <= 21 ) { echo "You are Eligible<br>" ; } if ( $age >= 18 || $age <= 21 ) { echo "You are Eligible<br>" ; } //Below condition is True So that "Not Operator(!)" will return False condition if (!( $age >= 18 )) { echo "You are Eligible<br>" ; } //Below condition is False So that "Not Operator(!)" will return True condition if (!( $age <= 18 )) { echo "You are Eligible<br>" ; } //If both condition is "True" OR "False" at that time xor will return "False" and if one condition is //"True" and s...
SELECT with SubQuery Syntax : SELECT columns FROM table1 WHERE column = (SELECT columns FROM table2 WHERE condition); In "personal" table, there are 6 columns named id, name, percentage, age, gender, city. In "personal" table, column name "id" is PRIMARY KEY and column name "city" is FOREIGN KEY. In "courses" table, there are 2 columns named course_id and course_name. In "courses" table, column name "course_id" is PRIMARY KEY. In "city" table, there are 2 columns named cid and cityname. In "city" table, column name "cid" is PRIMARY KEY. If we want to select records from "personal" table who belong to Delhi from "city" table using SubQuery then we can use below shown sql query : SELECT name FROM personal WHERE city = (SELECT cid FROM city WHERE cityname = "Delhi"); If we want to select records from "personal" table who belong to Delhi and Agra from...
<?php //There are many Get Functions in PHP as shown below: //get_class, get_parent_class, get_class_methods, get_class_vars, get_object_vars, get_called_class, //get_declared_classes, get_declared_interfaces, get_declared_traits, class_alias class ParentClass { function name () { echo "Class Name : " . get_class ( $this ) . "<br>" ; //Print the particualr Class Name //Print the particular Parent Class Name as shown below: echo "Parent Class Name : " . get_parent_class ( $this ) . "<br>" ; } } class ChildClass extends ParentClass { function __construct () {} function myfunction () {} function myfunction2 () {} } $obj = new ChildClass (); $obj -> name (); echo "Class Name is : " . get_class ( $obj ) . "<br>" ; echo "Paren...
Comments
Post a Comment