×
          
              
          
      
      Clear all filters including search bar
          
        Valeri Tandilashvili's Personal Professional Blog
      
    IFtruefalseIF(condition , [expression when true], [expression when false]);false0SELECT IF(0, 'true', 'false') AS BooleanIFSELECTSELECT *, 
    IF(points>=90, "Brilliant", "Lazy") AS class
FROM `students`
ORDER BY points DESCNested IFSELECT *, 
    IF(points>=90, "Brilliant", IF(points>=80, "Gold", IF(points>=60, "Silver", "Lazy"))) AS class
FROM `students`
ORDER BY points DESCIFSELECT *, 
    IF(points>=90, IF(points=(SELECT MAX(points) FROM students), "Highest", "Brilliant"), IF(points>=80, "Gold", IF(points>=60, "Silver", "Lazy"))) AS class
FROM `students`
ORDER BY points DESCIFWHEREmailmail2SELECT * 
FROM `students` 
WHERE IF(LENGTH(mail), mail, mail2) LIKE '%gmail.com%'let numbers = [10, 100, 1000]
let doubled = numbers.map(function(x){
  return x * 2
})
document.write(doubled)let doubled = numbers.map((x) => { return x * 2 })returnlet doubled = numbers.map((x) => x * 2);let doubled = numbers.map(x => x * 2);parenthesesSELF JOINSELECT  
    s1.*,
    s2.first_name
FROM `students` s1
JOIN `students` s2 ON s2.santa_id = s1.idaliasSELF JOINaliasfirst_namestudent_nameSELECT 
    id,
    first_name AS student_name
FROM studentsASSELECT 
    id,
    first_name student_name
FROM studentsaliasORDER BYSELECT *, price * quantity AS total
FROM `orders` 
ORDER BY total DESCalias.SELECT 
    s.id,
    s.first_name
FROM `students` sSELF JOINSELECT  
    s1.*,
    s2.first_name
FROM `students` s1
JOIN `students` s2 ON s2.santa_id = s1.idquotes'" ` SELECT
    id,
    first_name AS 'student_name'
FROM 
    studentsquotesSELECT 
    first_name, 
    last_name, 
    (points + 10) * 2 AS 'points calculated'
FROM students$arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
// Returns the JSON representation of a value (pretty printed)
echo json_encode($arr, JSON_PRETTY_PRINT);{
    "a": 1,
    "b": 2,
    "c": 3,
    "d": 4,
    "e": 5
}class Emp {
    public $name = "";
    public $hobbies  = [];
    public $birthdate = "";
}
$e = new Emp();
$e->name = "sachin";
$e->hobbies  = ["sport", "reading"];
$e->birthdate = date('Y-m-d', strtotime('2015-11-18'));
echo json_encode($e);{"name":"sachin","hobbies":["sport","reading"],"birthdate":"2015-11-18"}$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
// Decoding into an object
var_dump(json_decode($json));
// Decoding into an array
var_dump(json_decode($json, true));object(stdClass)#1 (5) {
  ["a"]=> int(1)
  ["b"]=> int(2)
  ["c"]=> int(3)
  ["d"]=> int(4)
  ["e"]=> int(5)
}
array(5) {
  ["a"]=> int(1)
  ["b"]=> int(2)
  ["c"]=> int(3)
  ["d"]=> int(4)
  ["e"]=> int(5)
}1. XML Syntactical whitespace - is whitespace required by the XML in order to delimitate XML constructs.
2. Insignificant Whitespace - is whitespace, that is not considered part of an element, if two elements are separated by just whitespace its considered insignificant.
3. Significant Whitespace - is whitespace that XML element attribute contains.thisdriveCar()firstNamelastNamewindowfirstName = "Jack"
lastName = "Ma"
function driveCar() {
  document.write(this.firstName + ' ' + this.lastName + ' is driving a car<br/>')
}
driveCar()callthisjohnlet john = {
  firstName: 'John',
  lastName: 'Doe'
}
function driveCar() {
  document.write(this.firstName + ' ' + this.lastName + ' is driving a car<br/>')
}
driveCar.call(john)- Comment must appear after XML declaration.
- Comment may appear anywhere in a document
- Comment must not appear within attribute values.
- Comment cannot be nested inside the other comment.truefalseif ("0") {
    
}.mt-3.mr-3.mb-3.ml-3.mx-3.my-3.m-3.pt-3.pr-3.pb-3.pl-3.px-3.py-3.p-3