Latest posts in ‘Snippets’ Category

  • [SQL] Toggle 1 and 0 in a Single Update Statement

    Oct 25, 2011 • SnippetsNo Comments
    [SQL] Toggle 1 and 0 in a Single Update Statement

    I use a lot of tinyint columns for my PHP projects, usually sticking to the convention of 1 means on/true and 0 means off/false. In other words, the perfect target for a SQL toggle statement! I recently found out a nifty trick to toggle a column between 1 and 0. To toggle a value, we ...

  • Generate QR Codes in WordPress Using Google Chart API

    Dec 17, 2010 • SnippetsNo Comments
    Generate QR Codes in WordPress Using Google Chart API

    Image via Wikipedia I have already blogged about Google Chart API. You might want to refresh that a bit. In this post let us see a specific use of this API, that is to generate QR Codes. This will be helpful for you, if you are hosting a mobile based What is a QR Code? ...