if(Condition, ConditionIsTrue, ConditionIsNotTrue) SELECT depending on condition UPDATE depending on condition Example – Increment value if below # or reset to 1
All posts by
Loops
foreach
json data examples
json Array Example 1 json Array Example 2 json example 2
Update From Row + Value Array
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 (\’ […]
.Quick access
HTML Symbols, character codes etc https://www.toptal.com/designers/htmlarrows/punctuation/ PHP echo the contents of an array
Lock row for modifying
Simple Read/Modify/Write lock using a DateTime column ModifyLocked is our lock column, defined as datetime, default Null.
DateTime INSERT UPDATE
Set value to Now +- time period Argument can be:
DateTime WHERE
Rows with a DateTime in the past Time based condition Argument can be: Null or in the future
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 […]