Tag Archives: if clause

Update database table depending on result from SELECT with CASE clause

Description: How to update a database table depending on a query on another or several tables ? Solution: If you want to make a script that does this, it’s very easy, just select all the values you need, and then … Continue reading

Posted in Best practices, SQL | Tagged , , , | Leave a comment

One line if / else clause in PHP

Description: Create an “if / else” check in one line. Solution: For assigning a value, or triggering a special function based on an “if / else” clause we can use the one line clause from PHP: $our_variable = (is_this_true()) ? … Continue reading

Posted in PhP | Tagged | Leave a comment