MySQL modify field value allow NULL

December 19, 2013

Columns are nullable by default. As long as the column is not declared UNIQUE or NOT NULL . However, things may change during development or to prevent insert error. Thus, run this comman, example:

PHP operator == vs ===

December 17, 2013

The operator == casts between two different types if they are different, while the === operator performs a ‘typesafe comparison’. That means that it will only return true if both operands have the same type and the same value. Examples: However, two instances of the same class do NOT match the === operator. Example:

How to delete GIT branch both in local and remote?

December 16, 2013

To delete local branch $ git branch -d your_local_branch To delete remote branch $ git push origin :your_remote_branch or $ git push origin –delete “branchName” Deleting remote branch normally done after you or your collaborators are finished with and have merged it into master branch. However deleting local branch maybe due to testing or wrong […]

JSON value not showing in HTML by PHP

December 16, 2013

There are few possibility why JSON data not being displayed properly. To debug your data, use If print_r shows empty or nothing, use Output: string ‘{"en":"Home","fr":"Office","cn":"bar"}’ (length=1 Possibility 1) – json data being encoded to html code. Some CMS will encoded the json data output. To solve this html entity issue, decode the data like […]

Processing PHP array with json jquery $.each() get key value

December 11, 2013

A simple start will be, example array Output: “1″ Another example given array: Output: “136438349186fwjbr is test3″ etc….