Ternary Operator if( , , )

if(Condition, ConditionIsTrue, ConditionIsNotTrue) SELECT depending on condition UPDATE depending on condition Example – Increment value if below # or reset to 1

Read More

Heredoc string

You can use the <<< sequence like this (this is called a Heredoc string): The terminating marker must be at the start of a line and the only thing on the line (no comment or even whitespace after it!!!) The advantage of this is that there is no need for line breaks, escape characters (\’ […]

Read More

.Quick access

HTML Symbols, character codes etc https://www.toptal.com/designers/htmlarrows/punctuation/ PHP echo the contents of an array

Read More

DateTime SELECT

Date Order ASC = oldest firstDESC = most recent first Date or DateTime from strings Get time difference between now and a DateTime field Argument can be: If DateTime value is Null? You will get a Null value returned from TIMESTAMPDIFF Specifying Returned Date Format Get SQL Server’s Current DateTime Same as Now() but giving […]

Read More