Problem with making a new page template

Permalink
Hi, I'm a bit new to Concrete5 but have found the interface really easy to use. I have read elsewhere that when you create a new Page Template at the panel, you need to create a new php file within the theme. So I've created this php file and copied the left sidebar theme from Elemental and edited it to my liking. (Kept most of it the same and added another row.)

<div class="container">
        <div class="row">
            <div class="col-md-3 col-sidebar">
                <?php
                $a = new Area('Sidebar');
                $a->display($c);
                ?>
            </div>
            <div class="col-md-8 col-sm-offset-1 col-content">
                <?php
                $a = new Area('Sidebar');
                $a->setAreaGridMaximumColumns(12);
                $a->display($c);
                ?>
            </div>


However I've tried to assign this to my page type and got this error:

"An exception occurred while executing 'select cID from Pages where cParentID in () and cInheritPermissionsFromCID = ': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and cInheritPermissionsFromCID =' at line 1"

I'm guessing its something to do with my database or am I missing something?