/*************************************************************************************
 * javascript.php
 * --------------
 * Author: Ben Keen (ben.keen@gmail.com)
 * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
 * Release Version: 1.0.8.1
 * Date Started: 2004/06/20
 *
 * JavaScript language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2008/05/23 (1.0.7.22)
 *  -  Added description of extra language features (SF#1970248)
 * 2004/11/27 (1.0.1)
 *  -  Added support for multiple object splitters
 * 2004/10/27 (1.0.0)
 *  -  First Release
 *
 * TODO (updated 2004/11/27)
 * -------------------------
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
    'LANG_NAME' => 'Javascript',
    'COMMENT_SINGLE' => array(1 => '//'),
    'COMMENT_MULTI' => array('/*' => '*/'),
    //Regular Expressions
    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array("'", '"'),
    'ESCAPE_CHAR' => '\\',
    'KEYWORDS' => array(
        1 => array(
            'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
            'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
            'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
            'while', 'write', 'with'
            ),
        2 => array(
            'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
            'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
            'protected', 'public', 'super', 'true', 'use', 'var'
            ),
        3 => array(
            // common functions for Window object
            'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
            'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
            'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
            'stop',
            )
        ),
    'SYMBOLS' => array(
        '(', ')', '[', ']', '{', '}',
        '+', '-', '*', '/', '%',
        '!', '@', '&', '|', '^',
        '<', '>', '=',
        ',', ';', '?', ':'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => false,
        2 => false,
        3 => false
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000066; font-weight: bold;',
            2 => 'color: #003366; font-weight: bold;',
            3 => 'color: #000066;'
            ),
        'COMMENTS' => array(
            1 => 'color: #006600; font-style: italic;',
            2 => 'color: #009966; font-style: italic;',
            'MULTI' => 'color: #006600; font-style: italic;'
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #000099; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 => 'color: #009900;'
            ),
        'STRINGS' => array(
            0 => 'color: #3366CC;'
            ),
        'NUMBERS' => array(
            0 => 'color: #CC0000;'
            ),
        'METHODS' => array(
            1 => 'color: #660066;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #339933;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            0 => '',
            1 => '',
            2 => '',
            3 => ''
            )
        ),
    'URLS' => array(
        1 => '',
        2 => '',
        3 => ''
        ),
    'OOLANG' => true,
    'OBJECT_SPLITTERS' => array(
        1 => '.'
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
    'SCRIPT_DELIMITERS' => array(
        0 => array(
            '<script type="text/javascript">' => '</script>'
            ),
        1 => array(
            '<script language="javascript">' => '</script>'
            )
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        0 => true,
        1 => true
        )
);

?>
/*************************************************************************************
 * javascript.php
 * --------------
 * Author: Ben Keen (ben.keen@gmail.com)
 * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
 * Release Version: 1.0.8.1
 * Date Started: 2004/06/20
 *
 * JavaScript language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2008/05/23 (1.0.7.22)
 *  -  Added description of extra language features (SF#1970248)
 * 2004/11/27 (1.0.1)
 *  -  Added support for multiple object splitters
 * 2004/10/27 (1.0.0)
 *  -  First Release
 *
 * TODO (updated 2004/11/27)
 * -------------------------
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
    'LANG_NAME' => 'Javascript',
    'COMMENT_SINGLE' => array(1 => '//'),
    'COMMENT_MULTI' => array('/*' => '*/'),
    //Regular Expressions
    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array("'", '"'),
    'ESCAPE_CHAR' => '\\',
    'KEYWORDS' => array(
        1 => array(
            'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
            'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
            'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
            'while', 'write', 'with'
            ),
        2 => array(
            'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
            'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
            'protected', 'public', 'super', 'true', 'use', 'var'
            ),
        3 => array(
            // common functions for Window object
            'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
            'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
            'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
            'stop',
            )
        ),
    'SYMBOLS' => array(
        '(', ')', '[', ']', '{', '}',
        '+', '-', '*', '/', '%',
        '!', '@', '&', '|', '^',
        '<', '>', '=',
        ',', ';', '?', ':'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => false,
        2 => false,
        3 => false
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000066; font-weight: bold;',
            2 => 'color: #003366; font-weight: bold;',
            3 => 'color: #000066;'
            ),
        'COMMENTS' => array(
            1 => 'color: #006600; font-style: italic;',
            2 => 'color: #009966; font-style: italic;',
            'MULTI' => 'color: #006600; font-style: italic;'
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #000099; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 => 'color: #009900;'
            ),
        'STRINGS' => array(
            0 => 'color: #3366CC;'
            ),
        'NUMBERS' => array(
            0 => 'color: #CC0000;'
            ),
        'METHODS' => array(
            1 => 'color: #660066;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #339933;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            0 => '',
            1 => '',
            2 => '',
            3 => ''
            )
        ),
    'URLS' => array(
        1 => '',
        2 => '',
        3 => ''
        ),
    'OOLANG' => true,
    'OBJECT_SPLITTERS' => array(
        1 => '.'
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
    'SCRIPT_DELIMITERS' => array(
        0 => array(
            '<script type="text/javascript">' => '</script>'
            ),
        1 => array(
            '<script language="javascript">' => '</script>'
            )
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        0 => true,
        1 => true
        )
);

?>
/*************************************************************************************
 * javascript.php
 * --------------
 * Author: Ben Keen (ben.keen@gmail.com)
 * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
 * Release Version: 1.0.8.1
 * Date Started: 2004/06/20
 *
 * JavaScript language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2008/05/23 (1.0.7.22)
 *  -  Added description of extra language features (SF#1970248)
 * 2004/11/27 (1.0.1)
 *  -  Added support for multiple object splitters
 * 2004/10/27 (1.0.0)
 *  -  First Release
 *
 * TODO (updated 2004/11/27)
 * -------------------------
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
    'LANG_NAME' => 'Javascript',
    'COMMENT_SINGLE' => array(1 => '//'),
    'COMMENT_MULTI' => array('/*' => '*/'),
    //Regular Expressions
    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array("'", '"'),
    'ESCAPE_CHAR' => '\\',
    'KEYWORDS' => array(
        1 => array(
            'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
            'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
            'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
            'while', 'write', 'with'
            ),
        2 => array(
            'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
            'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
            'protected', 'public', 'super', 'true', 'use', 'var'
            ),
        3 => array(
            // common functions for Window object
            'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
            'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
            'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
            'stop',
            )
        ),
    'SYMBOLS' => array(
        '(', ')', '[', ']', '{', '}',
        '+', '-', '*', '/', '%',
        '!', '@', '&', '|', '^',
        '<', '>', '=',
        ',', ';', '?', ':'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => false,
        2 => false,
        3 => false
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000066; font-weight: bold;',
            2 => 'color: #003366; font-weight: bold;',
            3 => 'color: #000066;'
            ),
        'COMMENTS' => array(
            1 => 'color: #006600; font-style: italic;',
            2 => 'color: #009966; font-style: italic;',
            'MULTI' => 'color: #006600; font-style: italic;'
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #000099; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 => 'color: #009900;'
            ),
        'STRINGS' => array(
            0 => 'color: #3366CC;'
            ),
        'NUMBERS' => array(
            0 => 'color: #CC0000;'
            ),
        'METHODS' => array(
            1 => 'color: #660066;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #339933;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            0 => '',
            1 => '',
            2 => '',
            3 => ''
            )
        ),
    'URLS' => array(
        1 => '',
        2 => '',
        3 => ''
        ),
    'OOLANG' => true,
    'OBJECT_SPLITTERS' => array(
        1 => '.'
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
    'SCRIPT_DELIMITERS' => array(
        0 => array(
            '<script type="text/javascript">' => '</script>'
            ),
        1 => array(
            '<script language="javascript">' => '</script>'
            )
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        0 => true,
        1 => true
        )
);

?>
/*************************************************************************************
 * javascript.php
 * --------------
 * Author: Ben Keen (ben.keen@gmail.com)
 * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
 * Release Version: 1.0.8.1
 * Date Started: 2004/06/20
 *
 * JavaScript language file for GeSHi.
 *
 * CHANGES
 * -------
 * 2008/05/23 (1.0.7.22)
 *  -  Added description of extra language features (SF#1970248)
 * 2004/11/27 (1.0.1)
 *  -  Added support for multiple object splitters
 * 2004/10/27 (1.0.0)
 *  -  First Release
 *
 * TODO (updated 2004/11/27)
 * -------------------------
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
    'LANG_NAME' => 'Javascript',
    'COMMENT_SINGLE' => array(1 => '//'),
    'COMMENT_MULTI' => array('/*' => '*/'),
    //Regular Expressions
    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array("'", '"'),
    'ESCAPE_CHAR' => '\\',
    'KEYWORDS' => array(
        1 => array(
            'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
            'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
            'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
            'while', 'write', 'with'
            ),
        2 => array(
            'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
            'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
            'protected', 'public', 'super', 'true', 'use', 'var'
            ),
        3 => array(
            // common functions for Window object
            'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
            'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
            'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
            'stop',
            )
        ),
    'SYMBOLS' => array(
        '(', ')', '[', ']', '{', '}',
        '+', '-', '*', '/', '%',
        '!', '@', '&', '|', '^',
        '<', '>', '=',
        ',', ';', '?', ':'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => false,
        2 => false,
        3 => false
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000066; font-weight: bold;',
            2 => 'color: #003366; font-weight: bold;',
            3 => 'color: #000066;'
            ),
        'COMMENTS' => array(
            1 => 'color: #006600; font-style: italic;',
            2 => 'color: #009966; font-style: italic;',
            'MULTI' => 'color: #006600; font-style: italic;'
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #000099; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 => 'color: #009900;'
            ),
        'STRINGS' => array(
            0 => 'color: #3366CC;'
            ),
        'NUMBERS' => array(
            0 => 'color: #CC0000;'
            ),
        'METHODS' => array(
            1 => 'color: #660066;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #339933;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            0 => '',
            1 => '',
            2 => '',
            3 => ''
            )
        ),
    'URLS' => array(
        1 => '',
        2 => '',
        3 => ''
        ),
    'OOLANG' => true,
    'OBJECT_SPLITTERS' => array(
        1 => '.'
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
    'SCRIPT_DELIMITERS' => array(
        0 => array(
            '<script type="text/javascript">' => '</script>'
            ),
        1 => array(
            '<script language="javascript">' => '</script>'
            )
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        0 => true,
        1 => true
        )
);

?>
<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
<channel>
    
    <title>GizmoLA.com - Web Tech</title>
    <link>http://www.gizmola.com/blog/</link>
    <description></description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.5 - http://www.s9y.org/</generator>
    <managingEditor>webmaster@gizmola.com</managingEditor>
<webMaster>webmaster@gizmola.com</webMaster>
<pubDate>Sat, 20 Aug 2011 01:54:45 GMT</pubDate>

    <image>
        <url>http://www.gizmola.com/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: GizmoLA.com - Web Tech - </title>
        <link>http://www.gizmola.com/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Calculate a person's age in a MySQL query -- continued</title>
    <link>http://www.gizmola.com/blog/archives/108-Calculate-a-persons-age-in-a-MySQL-query-continued.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/108-Calculate-a-persons-age-in-a-MySQL-query-continued.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=108</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=108</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    &lt;em&gt;The serendipity cache blew up on me for this article so I had to split it into 2 parts.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;DATE_ADD to the rescue&lt;/h2&gt;&lt;br /&gt;
MySQL knows how to work with the Gregorian calender, and I believe it is easier to let MySQL do the work, rather than trying to figure out how to implement the different cases.  I chose to implement the &quot;last day of the month&quot; technique.  In this case, we&#039;ll do this by creating a mysql date based on March 1st of the current year, and subtract one day from it to get to the last day of February.&lt;br /&gt;
&lt;br /&gt;
If you read my article on &lt;a href=&quot;http://www.gizmola.com/blog/archives/99-Finding-Next-Monday-using-MySQL-Dates.html&quot; title=&quot;Calculating week start using MySQL&quot;&gt;&quot;Finding next monday&quot; using mysql date functions&lt;/a&gt;, you would have seen how DATE_ADD() can be used to help solve a lot of problems, even though the name can be misleading when you are actually using it to subtract. Using it with the following test dates proves that mysql has fully implemented the leap year logic accurately:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/108-Calculate-a-persons-age-in-a-MySQL-query-continued.html#extended&quot;&gt;Continue reading &quot;Calculate a person&#039;s age in a MySQL query -- continued&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 19 Aug 2011 15:07:24 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/108-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>concat</category>
<category>curdate</category>
<category>date_add</category>
<category>day</category>
<category>month</category>
<category>mysql</category>
<category>mysql if()</category>
<category>sql</category>
<category>str_to_date</category>
<category>year</category>

</item>
<item>
    <title>Calculate a person's age in a MySQL query</title>
    <link>http://www.gizmola.com/blog/archives/107-Calculate-a-persons-age-in-a-MySQL-query.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/107-Calculate-a-persons-age-in-a-MySQL-query.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=107</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=107</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    Recently a question was posed on the &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1371&amp;amp;entry_id=107&quot;  onmouseover=&quot;window.status=&#039;http://www.phpfreaks.com/forums/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;Phpfreaks.com forums&quot;&gt;Phpfreaks.com forums&lt;/a&gt;, as to the best way for someone to store a user&#039;s birth date using the MySQL database.  One person suggested using a varchar as they were most familiar with string functions.  My answer was to use the MySQL date type.  &lt;br /&gt;
&lt;br /&gt;
I provided a quick &quot;advantages of using date&quot; comparison list:&lt;br /&gt;
&lt;strong&gt;Storing as a DATE&lt;/strong&gt;&lt;br /&gt;
&amp;bull;A MySQL Date requires 3 Bytes of storage&lt;br /&gt;
&amp;bull;You can do Date arithmetic inside mysql (search for dates within ranges) and use mysql functions to calculate values directly in a query&lt;br /&gt;
&amp;bull;It intrinsically will only store valid dates&lt;br /&gt;
&amp;bull;You can format it in numerous ways&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Storing as a Varchar&lt;/strong&gt;&lt;br /&gt;
&amp;bull;A string will require minimum 8 bytes, or 10 with separators&lt;br /&gt;
&amp;bull;can&#039;t do any form of efficient native range queries&lt;br /&gt;
&amp;bull;can&#039;t reformat it easily in SQL&lt;br /&gt;
&amp;bull;will allow completely invalid dates&lt;br /&gt;
&lt;br /&gt;
I thought a great proof of the benefit of this approach was to show that you could have MySQL calculate the person&#039;s current age in a query, using their birthday.  Certainly with a string, using PHP for example, you would typically query the database to pull out the string and for each row, turn it into a PHP date and do some calculations in your code, and you&#039;d arrive at the same place, but I wanted to show just how capable SQL -- and in this case MySQL can be especially when you use the native data types and some functions.&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/107-Calculate-a-persons-age-in-a-MySQL-query.html#extended&quot;&gt;Continue reading &quot;Calculate a person&#039;s age in a MySQL query&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 12 Aug 2011 00:40:29 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/107-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>concat</category>
<category>curdate</category>
<category>date_add</category>
<category>day</category>
<category>month</category>
<category>mysql</category>
<category>mysql if()</category>
<category>sql</category>
<category>str_to_date</category>
<category>year</category>

</item>
<item>
    <title>SQL UPDATE for strings in MongoDB</title>
    <link>http://www.gizmola.com/blog/archives/106-SQL-UPDATE-for-strings-in-MongoDB.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/106-SQL-UPDATE-for-strings-in-MongoDB.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=106</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=106</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    MongoDB currently does not offer the equivalent of a SQL Update statement when you want to change the value of a string to something that is based on the current value.  In my case I needed to find spaces and change them to underscores -- something done easily in php with str_replace(), and in MySQL with REPLACE.&lt;br /&gt;
&lt;br /&gt;
If you had a table named foo with a column named &quot;mystr&quot; you could do this sort of update like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;sql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;UPDATE&lt;/span&gt; foo &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SET&lt;/span&gt; mystr &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;mystr&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039; &#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;_&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
MongoDB does have collection.update() that works with a series of &quot;modifier&quot; operations, but none of them are useful for doing modifications to the current value of a document field when that field is a string.&lt;br /&gt;
&lt;br /&gt;
MongoDB does however support javascript, and the javascript replace() function implements a regular expression search and replace.  I was able to accomplish the update using the forEach() method to process the resulting documents one at a time.  While not as efficient as having mongo do this internally with a specially built update modifier, at least this method only needs to operate on documents that are known to require modifications, and could be run in the mongo interactive client easily.&lt;br /&gt;
&lt;br /&gt;
Again, assuming the collection is named &quot;foo&quot; and the document field is named &quot;mystr&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;javascript geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;db.foo.find&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; mystr: /&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;+/ &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.forEach&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; function&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;u&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; u.mystr = u.mystr.replace&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;/g, &amp;quot;_&amp;quot;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;; db.foo.save&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;u&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
An existing patch promises to add a new update() modifier but until such a time as it exists, this approach can be used when you need to update strings in a collection, referencing the existing values in the transformation. 
    </content:encoded>

    <pubDate>Fri, 20 May 2011 01:01:53 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/106-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>javascript</category>
<category>mongodb</category>
<category>MySQL</category>
<category>nosql</category>
<category>SQL</category>
<category>update</category>
<category>web development</category>

</item>
<item>
    <title>Load the Url symfony helper in a model or form class </title>
    <link>http://www.gizmola.com/blog/archives/105-Load-the-Url-symfony-helper-in-a-model-or-form-class.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/105-Load-the-Url-symfony-helper-in-a-model-or-form-class.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=105</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=105</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    I&#039;m doing some symfony work and needed to use the Url helper in a form class to return an error message that included a link.  I would consider this one of those exceptions where you really need to be able to have markup in a class rather than in a template.  &lt;br /&gt;
&lt;br /&gt;
I should probably mention that this is the way that works in version 1.4.3, and that the method that works in actions will not work in a form class. That method is:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;sfContext&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;getInstance&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;getConfiguration&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;loadHelpers&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
That method was deprecated and there is also &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1369&amp;amp;entry_id=105&quot;  onmouseover=&quot;window.status=&#039;http://webmozarts.com/2009/07/01/why-sfcontextgetinstance-is-bad/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;problems with sfContext&quot;&gt;this article to consider&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In this case, the solution was to access the sfApplicationConfiguration object.  In order to use the Url helper so you can call link_to() you need to also include the &#039;Tag&#039; helper.  &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;php geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;sfApplicationConfiguration&lt;span style=&quot;color: #339933;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;getActive&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;loadHelpers&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1370&amp;amp;entry_id=105&quot; title=&quot;http://www.php.net/array&quot;  onmouseover=&quot;window.status=&#039;http://www.php.net/array&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;Url&#039;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&#039;Tag&#039;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// now you can use link_to(...)&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Obviously this would allow you to load other helpers in the same way ... i18n for example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Tue, 18 Jan 2011 14:01:38 -0800</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/105-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
</item>
<item>
    <title>How to configure AVReloaded to work with Longtail's JW Player Google Analytics Pro plugin</title>
    <link>http://www.gizmola.com/blog/archives/103-How-to-configure-AVReloaded-to-work-with-Longtails-JW-Player-Google-Analytics-Pro-plugin.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/103-How-to-configure-AVReloaded-to-work-with-Longtails-JW-Player-Google-Analytics-Pro-plugin.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=103</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=103</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1359&amp;amp;entry_id=103&quot; title=&quot;http://allvideos.fritz-elfert.de/&quot;  onmouseover=&quot;window.status=&#039;http://allvideos.fritz-elfert.de/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;Allvideos Reloaded  (AVReloaded)&lt;/a&gt; is a really nice piece of software engineering from Fritz Elfert.  Rather than hardcode for all the individual players out there, Fritz created a macro system that allows you describe the parameters for any player, so it can be configured and updated.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 110px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://www.gizmola.com/blog/uploads/images/gap_scrn.png&#039;&gt;&lt;!-- s9ymdb:241 --&gt;&lt;img width=&#039;110&#039; height=&#039;20&#039;  src=&quot;http://www.gizmola.com/blog/uploads/images/gap_scrn.tn.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Click for screenshot of Google Analytics Event categories, generated by the Longtail GA Pro plugin&lt;/div&gt;&lt;/div&gt;Like the Allvideos plugin, AVReloaded comes bundled with the ubiquitous &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1361&amp;amp;entry_id=103&quot; title=&quot;http://www.longtailvideo.com/players/&quot;  onmouseover=&quot;window.status=&#039;http://www.longtailvideo.com/players/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;JW Player for Flash&lt;/a&gt;.  If you are streaming flash movies from your website, one &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1362&amp;amp;entry_id=103&quot; title=&quot;http://www.longtailvideo.com/addons/plugins/107/Google-Analytics-Pro?q=&quot;  onmouseover=&quot;window.status=&#039;http://www.longtailvideo.com/addons/plugins/107/Google-Analytics-Pro?q=&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;worthwhile plugin is longtail&#039;s Google Analytics Pro&lt;/a&gt;.  The current license price for the plugin is $19 from longtail&#039;s site.  If you&#039;re already using Google Analytics, the plugin feeds &quot;Content&quot; events from the player to Google Analytics which will show up under the &quot;Event Tracking&quot; menu.  Ever have questions like:  &quot;I wonder what videos people are actually watching on my site&quot; or &quot;for this new video, how many seconds do they watch before they get bored and close it?&quot;  If so, then this plugin is for you.   The player will generate events that GA groups into 3 categories: &quot;Video Plays&quot;, &quot;Percentage Played&quot; and &quot;Seconds Played&quot;.  Drilling down you get a nice list of the Videos on your site.   For example, finding out that people only watch on average 10% of that promotional video for your product is probably a sign that you may need some better material. &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/103-How-to-configure-AVReloaded-to-work-with-Longtails-JW-Player-Google-Analytics-Pro-plugin.html#extended&quot;&gt;Continue reading &quot;How to configure AVReloaded to work with Longtail&#039;s JW Player Google Analytics Pro plugin&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 14 Sep 2010 00:37:49 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/103-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>AllVideos Reloaded</category>
<category>AVReloaded</category>
<category>Event Tracking</category>
<category>Flash</category>
<category>Flash Video</category>
<category>Google Analytics</category>
<category>Google Analytics Pro</category>
<category>Joomla</category>
<category>JW Player</category>
<category>Longtail</category>

</item>
<item>
    <title>Joomla K2 Component ERD Schema and Tree traversal optimization with Catalog Mode</title>
    <link>http://www.gizmola.com/blog/archives/102-Joomla-K2-Component-ERD-Schema-and-Tree-traversal-optimization-with-Catalog-Mode.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/102-Joomla-K2-Component-ERD-Schema-and-Tree-traversal-optimization-with-Catalog-Mode.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=102</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=102</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    &lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 300px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://www.gizmola.com/blog/uploads/images/k2_schema.png&#039; onclick=&quot;F1 = window.open(&#039;/blog/uploads/images/k2_schema.png&#039;,&#039;Zoom&#039;,&#039;height=1199,width=1263,top=8,left=336,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:234 --&gt;&lt;img width=&#039;300&#039; height=&#039;285&#039;  src=&quot;http://www.gizmola.com/blog/uploads/images/k2_schema.tn.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Joomla K2 component Schema in png format&lt;/div&gt;&lt;/div&gt;In the recent profile of GB4K.com, I talked about the use of the K2 component from the Folks at JoomlaWorks.  While doing some customization, I decided to reverse engineer the K2 tables that are created and used by the component.  I provide the diagrams for interested parties and developers looking to understand how K2 is designed.  Keep in mind that these are logical diagrams, since Joomla and K2 have no intrinsic support for MySQL other than using the MyISAM engine, which doesn&#039;t support key constraints.  Click on the image to get the .png version, or &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1331&amp;amp;entry_id=102&quot;  onmouseover=&quot;window.status=&#039;http://www.gizmola.com/blog/index.php?serendipity[subpage]=downloads&amp;amp;thiscat=4&amp;amp;file=23&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;Download the .pdf version of the Schema here&quot;&gt;this link for a .pdf&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
One thing I noticed about K2, is that its tree traversal code can require a lot of queries to be run, especially if you have a lot of categories.  Over on the K2 forums, one K2 user with a large number of subcategories was complaining about the substantial overhead involved in displaying the top level Category for their site.  With over 1000 subcategories, the site was being hammered with an equal number of queries.&lt;br /&gt;
&lt;br /&gt;
This is because by default K2 will do a query for every category to find its child categories and items.  Since this is a recursive problem there&#039;s no inherent MySQL solution that would allow the developers to solve this problem in SQL (like the Oracle Start With ... Connect By syntax) so it&#039;s somewhat understandable that the JoomlaWorks developers provided a short circuit mechanism into the category configuration they call &quot;Catalog Mode&quot;.  The description of this configuration flag, which defaults to &quot;No&quot; is: &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;If you select &#039;yes&#039; then only the items directly belonging to this category will be retrieved. If you select &#039;no&#039; then items from all sub-categories will be retrieved. Setting this option to &#039;no&#039; is ideal for news/portal/magazine/blog layouts.&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
This setting simply shuts off the recursion behavior for the category. 
    </content:encoded>

    <pubDate>Thu, 09 Sep 2010 02:30:57 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/102-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>ERD</category>
<category>getK2.org</category>
<category>Joomla</category>
<category>JoomlaWorks</category>
<category>K2</category>
<category>Schema</category>

</item>
<item>
    <title>Get files from subversion without creating a sandbox using svn export</title>
    <link>http://www.gizmola.com/blog/archives/100-Get-files-from-subversion-without-creating-a-sandbox-using-svn-export.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/100-Get-files-from-subversion-without-creating-a-sandbox-using-svn-export.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=100</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=100</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    One of the first things people learn about using subversion is how to do a &quot;checkout&quot; using &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1297&amp;amp;entry_id=100&quot;  onmouseover=&quot;window.status=&#039;http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.ref.svn.c.checkout&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;svn checkout&quot;&gt;svn co&lt;/a&gt;.  The svn checkout command pulls files from the subversion repository into your &quot;sandbox&quot; and in so doing creates what subversion calls a &quot;working copy&quot;.  A working copy includes a &lt;em&gt;.svn&lt;/em&gt; directory in every subdirectory of the working copy, which is chock full of directories and files that svn uses to determine what you&#039;re doing in your sandbox.&lt;br /&gt;
&lt;br /&gt;
A &quot;working copy&quot; is designed to be just that -- a copy of the source tree built with the assumption that you will be making changes and committing them back to subversion. But what do you do if you want the files, but you don&#039;t need or want a sandbox?&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/100-Get-files-from-subversion-without-creating-a-sandbox-using-svn-export.html#extended&quot;&gt;Continue reading &quot;Get files from subversion without creating a sandbox using svn export&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 22 Feb 2010 23:27:59 -0800</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/100-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>php</category>
<category>subversion</category>
<category>svn</category>
<category>svn checkout</category>
<category>svn co</category>
<category>svn export</category>
<category>web development</category>
<category>Zend Framework</category>

</item>
<item>
    <title>Finding &quot;Next Monday&quot; using MySQL Dates</title>
    <link>http://www.gizmola.com/blog/archives/99-Finding-Next-Monday-using-MySQL-Dates.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/99-Finding-Next-Monday-using-MySQL-Dates.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=99</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=99</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    Several people who read my article on &lt;a href=&quot;blog/archives/51-Exploring-Mysql-CURDATE-and-NOW.-The-same-but-different..html&quot;  title=&quot;Exploring Mysql CURDATE and NOW. The same but different&quot;&gt;Exploring Mysql CURDATE and NOW. The same but different&lt;/a&gt; posed questions regarding how to return a valid MySQL date equivalent to &quot;Next Monday&quot; given any particular day, as determined by MySQL&#039;s CURDATE().  This is a little bit tricky, but can be done entirely in MySQL syntax, making it usable with Calendar applications built on top of MySQL queries, without the need to use serverside date functions.  This builds upon concepts discussed in my prior article, so if you have trouble understanding the implications of using CURDATE or DATE_ADD, you should probably take a minute and read that article. &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/99-Finding-Next-Monday-using-MySQL-Dates.html#extended&quot;&gt;Continue reading &quot;Finding &amp;quot;Next Monday&amp;quot; using MySQL Dates&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 01 Dec 2009 22:18:39 -0800</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/99-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>CURDATE</category>
<category>DateTime</category>
<category>DATE_ADD</category>
<category>DAYOFWEEK</category>
<category>MySQL</category>
<category>MySQL IF</category>
<category>Next Monday</category>
<category>Previous Monday</category>

</item>
<item>
    <title>Centos Virtual LAMP server -- Part II</title>
    <link>http://www.gizmola.com/blog/archives/97-Centos-Virtual-LAMP-server-Part-II.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/97-Centos-Virtual-LAMP-server-Part-II.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=97</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=97</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    &lt;a href=&quot;blog/archives/95-Run-a-Centos-Lamp-development-server-on-XP-using-VirtualBox.html&quot;  title=&quot;Part  1 LAMP on VirtualBox&quot;&gt;*Part 1 of this series is here*&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Customizing your LAMP server&lt;/h3&gt;&lt;br /&gt;
Unix people are probably familiar with the father of the DNS system -- the /etc/hosts file.  The hosts file has a simple format:&lt;br /&gt;
&lt;br /&gt;
ipaddress hostname&lt;br /&gt;
&lt;br /&gt;
In the days prior to DNS, people would update a master hosts file and copy it around to all the servers in the enterprise.  Surprisingly Windows versions also support this file, as a way of overriding DNS, so we can use this to our advantage, by adding an entry for our development server.  In this example, I&#039;m going to use dev.gizmola.com, which is not a real server.&lt;br /&gt;
&lt;br /&gt;
One important reason to do this is that Apache and other web servers, use a feature of HTTP 1.1 that specifies a header field named &quot;Host:&quot;.  This mechanism facilitates the service of multiple domains from a single apache server, through the configuration of apache virtual host (or vhost) entires.  The server uses the Host name in the HTTP header to determine how to route requests, so without host name resolution. you have to use non-standard ports and other mechanisms that are more trouble than they&#039;re worth. a&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/97-Centos-Virtual-LAMP-server-Part-II.html#extended&quot;&gt;Continue reading &quot;Centos Virtual LAMP server -- Part II&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 04 Aug 2009 18:10:08 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/97-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>apache</category>
<category>LAMP</category>
<category>mysql</category>
<category>php</category>
<category>remi</category>
<category>virtualbox</category>
<category>virtualization</category>
<category>yum</category>

</item>
<item>
    <title>Run a Centos Lamp development server on XP, Vista or Win 7 using VirtualBox</title>
    <link>http://www.gizmola.com/blog/archives/95-Run-a-Centos-Lamp-development-server-on-XP,-Vista-or-Win-7-using-VirtualBox.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/95-Run-a-Centos-Lamp-development-server-on-XP,-Vista-or-Win-7-using-VirtualBox.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=95</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=95</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    If you use a Windows based workstation or notebook computer virtualization offers a way for you to run a linux server environment using the same linux distribution and configuration you&#039;ll use in production.  Virtualization allows you to explore clustering and network setups that can&#039;t be tested on your workstation alone and simplifies your development environment by keeping the LAMP environment contained inside a VM.  &lt;br /&gt;
&lt;br /&gt;
While VMWare offers these capabilities with their VMWare workstation product, Sun has created a free alternative called VirtualBox, with many of the same capabilities in VMWare workstation.  VirtualBox runs on a variety of intel chip based operating systems including OS/X, Windows XP &amp;amp; Vista, Linux and Solaris, and supports the installation of many different &quot;Guest&quot; operating systems.  In this article, I&#039;ll detail the installation and configuration of Centos.  Centos is a great choice for a Linux server operating system, as it is widely used by hosting companies due to its Redhat Enterprise Linux (RHEL) core.&lt;br /&gt;
&lt;br /&gt;
Our goals in this setup will be:&lt;br /&gt;
&lt;br /&gt;
&amp;bull; Centos server running the LAMP stack&lt;br /&gt;
&amp;bull; XP can be used to develop code using the IDE of your choice.  &lt;br /&gt;
&amp;bull; The XP Workstation can communicate with the linux server using standard tools: putty, winscp, firefox&lt;br /&gt;
&amp;bull; The setup works even when no other networking is available.  When a network is available, no network reconfiguration is required.&lt;br /&gt;
&amp;bull; Use XP to setup private domain resolution so apache vhost configurations can be tested.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s get started.   &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/95-Run-a-Centos-Lamp-development-server-on-XP,-Vista-or-Win-7-using-VirtualBox.html#extended&quot;&gt;Continue reading &quot;Run a Centos Lamp development server on XP, Vista or Win 7 using VirtualBox&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 16 Jul 2009 14:07:21 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/95-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>Centos</category>
<category>LAMP</category>
<category>Linux</category>
<category>Redhat</category>
<category>RHEL</category>
<category>VirtualBox</category>
<category>virtualization</category>

</item>
<item>
    <title>Too much information about the MySQL TIMESTAMP</title>
    <link>http://www.gizmola.com/blog/archives/93-Too-much-information-about-the-MySQL-TIMESTAMP.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/93-Too-much-information-about-the-MySQL-TIMESTAMP.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=93</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=93</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    The MySQL timestamp is an oddity, being both a mySQL &quot;Data Type&quot; as well as a type of specialty column that provides a built in default.  It doesn&#039;t help matters, that the timestamp was changed significantly around mysql version 4.1.  &lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;The Old TIMESTAMP&lt;/h3&gt;&lt;br /&gt;
In older mysql versions, the TIMESTAMP was not in the same format as a DateTime column, and you could also set up truncation by defining the TIMESTAMP to have a fixed size.  For example, you could define a TIMESTAMP column to be a TIMESTAMP(4) which would then only store the 4 digit Year portion of a DateTime value.  I won&#039;t go into much detail on the pre version 4.1 TIMESTAMP, however, if you&#039;re stuck with an older version of MySQL I recommend you read the manual carefully before you attempt to use any of the information here.  I&#039;m going to concentrate on the current TIMESTAMP.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;TIMESTAMP Properties&lt;/h3&gt;&lt;br /&gt;
At its most fundamental, the TIMESTAMP is really nothing more than a Unix TimeStamp, which is to say, that internally it is stored as an integer value of seconds.  Where a MySQL DATETIME column can be used to store any date and time from Jan 1, 1000 to 12/31/9999, the TIMESTAMP is limited in the same ways that the Unix timestamp is currently limited -- it can only store values from Jan 1, 1970 to Jan 9, 2038.  &lt;br /&gt;
&lt;br /&gt;
Those familiar with Unix design, will recognize the Jan 9, 2038 date as being the next big &quot;Y2K&quot; computing panic, and if you&#039;re young enough, you may realize a large payday in your future, selling remediation services to companies in roughly another 28 years.  The folks at &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1020&amp;amp;entry_id=93&quot;  onmouseover=&quot;window.status=&#039;http://www.y2038.com/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://www.y2038.com/&quot;&gt;http://www.y2038.com/&lt;/a&gt; are already estimating this to be as much as a 10 trillion dollar jackpot, although no doubt by that time most of the coding will be done by the Morlocks from their &lt;em&gt;underground cave cities&lt;/em&gt;.   Outsourcing of IT to Morlocks will be a major industry trend by the year 2020, mark my words.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/93-Too-much-information-about-the-MySQL-TIMESTAMP.html#extended&quot;&gt;Continue reading &quot;Too much information about the MySQL TIMESTAMP&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 23 Apr 2009 13:55:47 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/93-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>DateTime</category>
<category>MySQL</category>
<category>NOW()</category>
<category>timestamp</category>
<category>Web Development</category>

</item>
<item>
    <title>Mysql Update:  Null + 1 is Null!  </title>
    <link>http://www.gizmola.com/blog/archives/91-Mysql-Update-Null-+-1-is-Null!.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/91-Mysql-Update-Null-+-1-is-Null!.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=91</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=91</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    &lt;h3&gt;&lt;u&gt;You can&#039;t add to Null&lt;/u&gt;&lt;/h3&gt;&lt;br /&gt;
Here&#039;s something about mysql create table definitions that can easily catch you if you aren&#039;t careful.  Consider this table definition:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mysql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;TABLE&lt;/span&gt; screenshots &lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#40;&lt;/span&gt;id &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;INT&lt;/span&gt; &lt;span style=&quot;color: #CC0099; font-weight: bold;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #9900FF; font-weight: bold;&quot;&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;KEY&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;,&lt;/span&gt; votes &lt;span style=&quot;color: #FF9900; font-weight: bold;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;mysql&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt; CREATE TABLE screenshots &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #c20cb9; font-weight: bold;&quot;&gt;id&lt;/span&gt; INT NOT NULL AUTO_INCREMENT PRIMARY KEY, votes INT&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;; &amp;#160; &amp;#160; &amp;#160;&lt;br /&gt;Query OK, &lt;span style=&quot;color: #000000;&quot;&gt;0&lt;/span&gt; rows affected &lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;0.09&lt;/span&gt; sec&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
What the user wanted was a simple table to keep track of user submitted screen shots.  Of course the real table had a submission date, and name column but I&#039;ve omitted those in order to focus on what can happen when you allow a numeric column to have NULL values.  &lt;br /&gt;
&lt;br /&gt;
In the application in question, when a user votes for the screen shot they like, the system should &quot;count&quot; the vote, by increasing the values in the &quot;votes&quot; column by one.  Initially the developer working on this application was trying to read the value from the database, and in a PHP web script, they would increment this value and take the result and set &quot;votes&quot; to be equal to it in an UPDATE statement.  I explained that this could cause lost votes, because if two or more users were voting at nearly the same time, each would overwrite the value of the &quot;vote&quot; column.  In fact there are scenarios far worse than that --- a user with a cached page could vote and set the vote count back days or weeks.  I didn&#039;t bother to mention the possibility that someone might recognize what was going on in the web form, and start tampering with it, since it was plainly evident that the form was passing the current number of votes.  &lt;br /&gt;
&lt;br /&gt;
One of the many benefits of using a relational database is built in concurrency.  In an UPDATE statement, you can add to the value of the column without having to know what its original value is, just as computer languages allow assignment to a variable that references the variable&#039;s current value (ie. $a = $a + 1, $a++).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mysql geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;&quot;&gt;&lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;UPDATE&lt;/span&gt; screenshots &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;SET&lt;/span&gt; votes &lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt; votes &lt;span style=&quot;color: #FF00FF;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008080;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #990099; font-weight: bold;&quot;&gt;WHERE&lt;/span&gt; id &lt;span style=&quot;color: #FF00FF;&quot;&gt;=&lt;/span&gt; &amp;#160;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
All that&#039;s needed is to have the serverside language provide a value for a particular &quot;id&quot;  and the votes will be tallied and updated correctly.  Even more importantly, mysql will serialize the updates, insuring that no votes are lost.&lt;br /&gt;
&lt;br /&gt;
However, given the original Mysql CREATE TABLE statement , what will happen if our code embeds the UPDATE statement provided? &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/91-Mysql-Update-Null-+-1-is-Null!.html#extended&quot;&gt;Continue reading &quot;Mysql Update:  Null + 1 is Null!  &quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 12 Feb 2009 12:18:11 -0800</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/91-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>LAMP</category>
<category>MySQL</category>
<category>Null</category>
<category>SQL</category>
<category>Update</category>
<category>Web Development</category>

</item>
<item>
    <title>Lampsig 2008 Presentation on Subversion for Lamp Developers</title>
    <link>http://www.gizmola.com/blog/archives/88-Lampsig-2008-Presentation-on-Subversion-for-Lamp-Developers.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/88-Lampsig-2008-Presentation-on-Subversion-for-Lamp-Developers.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=88</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=88</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    &lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://www.gizmola.com/blog/pages/svnpresentation.html&#039;&gt;&lt;!-- s9ymdb:157 --&gt;&lt;img width=&#039;266&#039; height=&#039;189&#039; style=&quot;float: left; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.gizmola.com/blog/uploads/images/snvpres.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Here are the slides for the presentation on subversion I gave at the September 2008 LampSIG meeting.  I hope some may find them useful, however they were meant only to provide a skeleton for the talk, and aren&#039;t a complete tutorial by any means.  The following links to other sites were mentioned in the talk:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1023&amp;amp;entry_id=88&quot;  onmouseover=&quot;window.status=&#039;http://svnbook.red-bean.com/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;red-bean book&quot;&gt;The Red bean book, aka Subversion manual&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1024&amp;amp;entry_id=88&quot;  onmouseover=&quot;window.status=&#039;http://www.orcaware.com/svn/wiki/Svnmerge.py&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;The svnmerge python script&quot;&gt;The svnmerge python script&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1025&amp;amp;entry_id=88&quot;  onmouseover=&quot;window.status=&#039;http://www.onlamp.com/pub/a/onlamp/2004/08/19/subversiontips.html?page=1&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;Subversion tips&quot;&gt;Subversion tips Article&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1026&amp;amp;entry_id=88&quot;  onmouseover=&quot;window.status=&#039;http://www.digilife.be/quickreferences/QRC/Subversion%20Quick%20Reference%20Card.pdf&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;Subversion Cheat Card&quot;&gt;Subversion Cheat Card&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Mon, 13 Oct 2008 14:24:39 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/88-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>LAMP</category>
<category>LampSig</category>
<category>Subversion</category>
<category>SVN</category>
<category>Web Development</category>

</item>
<item>
    <title>New Lula/Lampsig Coop Server</title>
    <link>http://www.gizmola.com/blog/archives/85-New-LulaLampsig-Coop-Server.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/85-New-LulaLampsig-Coop-Server.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=85</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=85</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    So the UML Coop has finally after 3 years of talking about it, acquired a new server from Silicon Mechanics.  Read the rest of the article for the complete specifications.  We will be moving off User Mode Linux (UML) and on to OpenVZ. This change will allow us to accept some new members to the coop, so if you&#039;re interested drop me a line.&lt;br /&gt;
&lt;!-- s9ymdb:154 --&gt;&lt;img width=&#039;110&#039; height=&#039;37&#039; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.gizmola.com/blog/uploads/images/server.tn.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.gizmola.com/blog/archives/85-New-LulaLampsig-Coop-Server.html#extended&quot;&gt;Continue reading &quot;New Lula/Lampsig Coop Server&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 24 Jul 2008 10:55:09 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/85-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>Coop</category>
<category>LampSig</category>
<category>Lula</category>
<category>OpenVZ</category>
<category>Silicon Mechanics</category>

</item>
<item>
    <title>LAMP Tutorial Series originally published on PHPFreaks.com</title>
    <link>http://www.gizmola.com/blog/archives/82-LAMP-Tutorial-Series-originally-published-on-PHPFreaks.com.html</link>
            <category>Web Tech</category>
    
    <comments>http://www.gizmola.com/blog/archives/82-LAMP-Tutorial-Series-originally-published-on-PHPFreaks.com.html#comments</comments>
    <wfw:comment>http://www.gizmola.com/blog/wfwcomment.php?cid=82</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gizmola.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=82</wfw:commentRss>
    

    <author>nospam@example.com (David Rolston)</author>
    <content:encoded>
    A few years ago I published a 3 part LAMP tutorial series entitled &lt;strong&gt;LAMP, MySQL/PHP Database Driven Websites&lt;/strong&gt; on the well known php community website PHPFreaks.com.  This series dealt with a slew of practical issues including how a LAMP server works, relational database design using MySQL, many to many tables, SQL inner and outer joins, practical PHP debugging, php documentation tools, basic PHP classes, css, interactive javascript &amp;amp; DHTML with a &lt;em&gt;chooser&lt;/em&gt; widget, php HEREDOC and php basics like how to process forms and utilize GET and POST methods.&lt;br /&gt;
&lt;br /&gt;
The series was fairly successful, (a 4.5 of 5 after hundreds of ratings), many pages of comments and questions, and page views to the 100k&#039;s+ although PHPFreaks auditing system was turned off at some point and stopped recording views.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, some years ago PHPFreaks.com suffered some fairly catastrophic issues with its publishing system.  There were also some bugs, and the site was exploited with some XSS, and the admins simply decommissioned the majority of the site.  My series was part of what disappeared.  At that point, a couple of college Computer Science courses on web development had taken the series and integrated it into their curriculum, and the professor of one of these courses had converted it into a Word document, which I was able to download and convert to pdf.&lt;br /&gt;
&lt;br /&gt;
I plan to write a compatible publishing addon for gizmola.com so that I can take the original markup and republish it here, but in the meantime, here is the series in pdf format.  The conversion utility they used stripped out the original markup, and page breaks are gone, but the text, source code, and illustrations are all still there.  &lt;br /&gt;
&lt;br /&gt;
I also offer all the source code for parts 2 &amp;amp; 3 of the series.  I&#039;m not sure what happened to the source for part 1, however, it is all included inline in the tutorial.  &lt;a href=&quot;http://www.gizmola.com/blog/exit.php?url_id=1036&amp;amp;entry_id=82&quot;  onmouseover=&quot;window.status=&#039;http://www.gizmola.com/blog/index.php?serendipity[subpage]=downloads&amp;amp;level=1&amp;amp;thiscat=6&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;LAMP Tutorial Series.&quot;&gt;The &lt;strong&gt;LAMP, MySQL/PHP Database Driven Websites&lt;/strong&gt; series is now available in pdf format.  Click here.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Tue, 27 May 2008 12:52:58 -0700</pubDate>
    <guid isPermaLink="false">http://www.gizmola.com/blog/archives/82-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><category>LAMP</category>
<category>MySQL</category>
<category>PHP</category>
<category>PHPFreaks</category>
<category>Tutorial</category>
<category>Web Development</category>

</item>

</channel>
</rss>
