#!/usr/bin/python
"""
Module   : halfcooked.quixote.database.populateDb
Purpose  : populate the gadfly tables for my web application
Arguments; None

"""
__author__ = "Andy Todd <andy47@halfcooked.com>"
__date__ = "$Date: 2003/08/11 19:34:04 $"
__version__ = "$Revision: 1.9 $"

import gadfly

def openDb(dbName, dbDir="./gadfly"):
    db = gadfly.gadfly(dbName, dbDir)
    return db

def populateTables(db):
    "Populate each of the tables as necessary"
    # define some constants
    siteId = 1
    styleSheet = "/styles/andrew.css"
    # Just the one site for nw
    cursor = db.cursor()
    stmt = """INSERT INTO sites ( site_id, name, url ) VALUES ( ?, ?, ? )"""
    cursor.execute(stmt, (siteId, "Andrew", "http://www.andrew-todd.com"))
    # A site is made up of pages
    # Start pages
    stmt = """INSERT INTO pages ( site_id, page_id, title, heading, subhead, stylesheet, url, valid)
                    VALUES (?, ?, ?, ?, ?, ?, ?, ?)"""
    cursor.execute(stmt, (siteId,1,"Home", "Welcome to My Home on the Web", "Proudly Content Free since 2000", styleSheet,"index.html", "Y"))
    cursor.execute(stmt, (siteId,2,"Photo Album", "A Cornucopia of Visual Delights", "Otherwise known as the photo album", styleSheet,"photos.html", "Y"))
    cursor.execute(stmt, (siteId,3,"Links", "My Links", "Places to go, things to see", styleSheet,"links.html", "Y"))
    cursor.execute(stmt, (siteId,4,"CD Stacker", "Whats in my CD stacker?", "10 slots, 10 Compact Discs", styleSheet,"stacker.html", "Y"))
    cursor.execute(stmt, (siteId,5,"About Me", "All About Me", "A.K.A. - Who said narcissism was dead?", styleSheet,"about_me.html", "Y"))
    cursor.execute(stmt, (siteId,6,"Wish List", "All I want for Christmas is my two front teeth ...", "A place for me to list all of things I would like", styleSheet, "wishlist.html", "Y"))
    cursor.execute(stmt, (siteId,7,"Where are We?", "Where are We?", "Your online guide to our whereabouts", styleSheet,"whereare.html", "Y"))
    cursor.execute(stmt, (siteId,21,"Engagement Party", "We Got Engaged and we had a Party!", "Some pictures from our engagment party 24.02.2001", styleSheet, "photos1.html", "Y"))
    cursor.execute(stmt, (siteId,22,"Christmas 2000", "Christmas 200 in the UK", "Click on any of the thumbnails to get a larger picture", styleSheet, "photos2.html", "Y"))
    cursor.execute(stmt, (siteId,23,"Sydney Olympics", "Sydney Olympics", "Click on any of the thumbnails to get a larger picture", styleSheet, "photos3.html", "Y"))
    cursor.execute(stmt, (siteId,24,"Christmas 1999", "Photos from Christmas 1999", "Action shots from Christmas 1999", styleSheet, "photos4.html", "Y"))
    cursor.execute(stmt, (siteId,25,"New Year 1999", "More Festive Photos", "Photos from Boxing Day and New Years Eve 1999", styleSheet,"photos5.html", "Y"))
    cursor.execute(stmt, (siteId,26,"Boat Photos", "A Yacht Called Resolute", "Photos from our boat", styleSheet, "photos6.html", "Y"))
    cursor.execute(stmt, (siteId,27,"Older Christmas Pictures", "Christmases Gone By", "Photos from Christmas celebrations before 1999", styleSheet, "photos7.html", "Y"))
    cursor.execute(stmt, (siteId,28,"Miscellaneous", "The Rest", "Assorted photos with no home", styleSheet, "photos8.html", "Y"))
    cursor.execute(stmt, (siteId,29,"The Easter Bunny Chronicles", "Easter Bunny", "The trials of a stuffed toy", styleSheet, "photos9.html", "Y"))
    cursor.execute(stmt, (siteId,30,"Leaving Sydney", "Another Party", "We were leaving town and they threw a party", styleSheet, "photos10.html", "Y"))
    cursor.execute(stmt, (siteId,31,"January 2003", "Assorted images", "The 'I need to clear my digital camera' page", styleSheet, "photos11.html", "Y"))
    cursor.execute(stmt, (siteId,32,"Wedding", "Our Wedding", "Pictures from the 16th of August, 2002", styleSheet, "photos12.html", "Y"))
    cursor.execute(stmt, (siteId,33,"Le Baou d'Infer", "My Cooking Holiday", "Pictures from our cooking holiday in the south of France May, 2003", styleSheet, "photos13.html", "Y"))
    # Note that contents will be a valid chunk of HTML
    # or, that a section will be made up of a number of links
    # Start sections
    stmt = """INSERT INTO sections ( section_id, title, section_type, contents ) 
                   VALUES (?, ?, ?, ?)"""
    cursor.execute(stmt, (91, "Sections", "links", ""))
    cursor.execute(stmt, (92, "Recommended", "links", ""))
    cursor.execute(stmt, (93, "Validation", "links", ""))
    cursor.execute(stmt, (11, "Welcome", "contents", """    <h4>What have we got here then?</h4>\n    Welcome to &quot;www.I'm a miserable bugger.com&quot; as coined by that 70's throwback during his best man's speech at our wedding.\n    <br /><br />\n    This is actually the home page for me, Andrew J Todd esq. If you are looking for anyone else I feel you may be sadly disappointed.\n    <br /><br />\n    <p>New for March, 2003. A completely different look for this web site, again. I've gone back to basics in the vain hope that my Dad will now be able to read this web site and not complain that the background is black (well, actually a rather attractive dark blue).<br /><br />\n    New for November 2002. I have updated the <a href="./about_me.html">About me</a> page to reflect our changed circumstances.\n    <br /><br />\n    New for October 2002. The <a href="./diary/">diary</a> has moved again. New features include the ability to add comments to my musings.\n    <br /><br />\n    New for June 2002. A page of <a href="./photos10.html">photos</a> from our farewell to Sydney dinner.\n    <br /><br />\n    New for June 2002. A new page. <a href="./whereare.html">Where are we now?</a>. This is your online guide to our whereabouts over the next few months.\n    <br /><br />\n    New for . This web site has moved. If you are using <a href="http://www.andrew-todd.com/">http://www.andrew-todd.com/</a> then you shouldn't notice any difference, hopefully.\n    <br /><br />\n    New for April 2002. The <a href="photos9.html">Easter Bunny Chronicles</a> in the <a href="photos.html">Photo Album</a>.\n    <br /><br />\n    New for March 2002. A picture of the family Reeve has been added to the <a href="photos8.html">Miscellaneous</a> photos page.\n    <br /><br />\n    New for January 2002, look, its a new design for the home page. If you like it feel free to send me an <a href="mailto:andrew@andrew-todd.com">email</a>.\n    <br /><br />\n    If you are here by mistake may I recommend departing for pastures new where there is a slim chance you may become slightly better <a href="http://news.bbc.co.uk/">informed</a>.\n    <br /><br />\n    All of the bits and pieces of this web site can be accessed through the navigation links to the left.\n    <br /><br />\n    For those who pine for the old front page, we have;</p>\n    <ul>\n      <li>The photo <a href="photos.html">album</a>.</li>\n      <li>Everyone's favourite, the <a href="blogger.html">diary</a>. The very oldest archives can be found <a href="diary.html#latest">here</a>.</li>\n      <li>A content free feature - what's in my CD <a href="stacker.html">stacker</a>?</li>\n      <li>You will find my links on this <a href="links.html">page</a>. That shouldn't stop you finding your own information on the <a href="http://www.google.com/">web</a> though.</li>\n      <li>For the ultimate in web site indulgence, here is a page all about <a href="about_me.html">me</a>.</li>\n      <li>For anyone who wants to buy me a present, and why wouldn't you want to, your first port of call should be the <a href="wishlist.html">wishlist page</a>.</li>\n    </ul>\n    <h4>Technical Stuff</h4>\n    <p>Nerdy bits and bobs have been moved to their own <a href="http://www.halfcooked.com/">web site</a>.\n    <br />\n    If you can't find what you want, try sending me an <a href="mailto:andrew@andrew-todd.com">e-mail</a>.</p>"""))
    cursor.execute(stmt, (20, "Photo Pages", "contents", "    <p>Here is a list of the different photo pages on this web site. Surprisingly then newer ones are higher in the list so you don't have to do too much of that nasty scrolling if you just want to see the latest and greatest. Click on any title to view the associated photos.</p>"))
    cursor.execute(stmt, (21, "Photo Pages", "links", ""))
    cursor.execute(stmt, (30, " My Links", "contents", """    <h4>Interesting Spots on the Web</h4>\n    <ul>\n      <li>Exmouth Youth Theatre club have a web site <a href="http://www.eytc.org.uk/">here</a>. If you are wondering why I care, my brother is the technical manager.</li>\n      <li>As featured in the photo album, the Gladstone family has a web site <a href="http://www.users.bigpond.com/bagladstone/">here</a>, they also have a corporate web site <a href="http://www.foosball.com.au/">here</a>.\n      <li>For literary noodling, and better HTML than the above, try the (sometimes) very lovely <a href="http://www.matthew.mumford.com/">Mr Mumford</a>.</li>\n      <li>Jon Palmer went back to school and updated his <a href="http://www.zip.com.au/~montydog">web site</a> as part of an assignment. Sadly it hasn't changed since, and he still hasn't found the spell checker.</li>\n      <li>Finally, Richard has entered this webby world. Check out <a href="http://www.belindaallen.com">Belinda's site</a> and one for the whole <a href="http://www.richardandbelinda.com/">family</a>.</li>\n      <li>A brave soul has tried to explain <a href="http://www.bbc.co.uk/h2g2/guide/A224542">Exmouth</a></li>\n    </ul>\n"""))
    cursor.execute(stmt, (31, "Technical Links", "contents", """    <h4>Technical Bits and Bobs</h4>\n    <ul>\n      <li>For top GNU/Linux, you can't beat <a href="http://www.debian.org/">Debian</a>.</li>\n      <li>My programming language of choice is <a href="http://www.python.org/">Python</a>. It is a readable, powerful, dynamic programming language. Its also easy to learn, so if you fancy writing a computer program check it out.</li>\n      <li>If you want to build graphical applications easily using Python you can try using <a href="http://www.pythoncard.org/">PythonCard</a>.</li>\n      <li>I make my living by dabbling with software from, amongst others, the lovely people at <a href="http://www.oracle.com/">Oracle</a>. Thanks for all of the money Larry.</li>\n    </ul>\n"""))
    cursor.execute(stmt, (32, "Knowledge Quest", "contents", """    <h4>The Quest for Knowledge</h4>\n    <p>My motto is that you can never know too much. Try these sites to learn even more about the world we live in.</p>\n    <ul>\n      <li>Where better to start than the <a href="http://www.bbc.co.uk/h2g2/">Hitch Hikers Guide to the Galaxy</a>.</li>\n      <li>If thats not enough, try the web site that can tell you about <a href="http://www.everything2.com/">everything</a>.</li>\n      <li>Failing those, try the <a href="http://www.britannica.com/">Encyclopedia Britannica</a>.</li>\n      <li>For that regular injection of nerdy news, forget <a href="http://slashdot.org/">/.</a>, head straight for <a href="http://www.theregister.co.uk/">The Register</a>.</li>\n    </ul>\n"""))
    cursor.execute(stmt, (40, "Stacker Introduction", "contents", """    <p>Every personal web site has a list. This is mine.</p><p>I like music. Rather than just put a static list here I decided to let you, you special smashers, have a glimpse into the murky contents of my car boot. This way, when I refill the cartridge I get to update this page as well.</p>"""))
    cursor.execute(stmt, (41, "Stacker List", "contents", """    <h4>23.02.2003</h4>\n    <p>Except now. Because I've sold my beloved Prelude and am now driving a car which doesn't have CD stacker. This page is now on hold until I am back in a car with an extensive sound system. I may turn this into a different list, but not just now.</p>"""))
    cursor.execute(stmt, (50, "Me Me Me", "contents", """
    <p>Just in case anyone visiting my web site wants to know anything about me ( you strange people, you ) here is some information. I have developed this web site for my own amusement more than anything else, but if you want to get in touch, here you go;</p>\n    <h4>Vital Statistics</h4>\n    <p>As if I would put that kind of information on a web site. Well, I will tell you that I was born on the 11th of October, 1968 and any presents to congratulate me on the anniversary of my birth are always welcome.<br /><br />Oh, and I've got baby blue eyes.</p>\n    <h4>Contact Details</h4>\n    <p>In the first instance, try e-mail. I have a number of accounts, but the one that I generally read is <a href="mailto:andrew@andrew-todd.com">andrew@andrew-todd.com</a>.<br /><br />As of the 9th of November, 2002 we are no longer homeless. You can find us at;</p>\n    <table>\n      <tr>\n        <td> By post: </td>\n        <td> 309 Cavendish Road, <br />Balham, <br />London SW12 0PQ, <br />United Kingdom</td>\n      </tr>\n      <tr>\n        <td> Phone no: </td>\n        <td> +44 20 8675 1505</td>\n      </tr>\n      <tr>\n        <td> Mobile: </td>\n        <td> +44 7739 745132</td>\n      </tr>\n    </table>\n    <p>For directions may I suggest going to <a href="http://www.streetmap.co.uk/">http://www.streetmap.co.uk</a> and typing in our post code.</p>\n    <h4>Work</h4>\n    <p>By day, I am employed by <a href="http://www.javelingroup.com/" target="_blank">Javelin Group</a> as a consultant. I specialise in developing systems using the <a href="http://www.oracle.com/">Oracle</a> database and development tools. I'm also the top data warehousing techie and general all round nice guy.<br /><br />They are also kindly askng me to expand my knowledge and product understanding so I am currently using <a href="http://www.alterian.com/">Alterian</a>, <a href="http://www.microsoft.com/sql">SQL Server</a> and <a href="http://java.sun.com/">Java</a> to name but a few of the pies I have a finger in.<br /><br />Strangely enough, I'm also improving my skills in various other ways, including trying to build some interesting applications. Have a look at <a href="http://pythoncard.sourceforge.net/">PythonCard</a>, <a href="http://gadfly.sourceforge.net/">Gadfly</a> and <a href="http://dbdoc.sourceforge.net/">dbdoc</a> to see how I spend my spare time.<br /><br />For the next revision of this site, I may even post my curriculum vitae here. Then again, maybe I wont.</p>"""))
    cursor.execute(stmt, (60, "Wishlist intro", "contents", """    <p>Bobo is always complaining that she doesn't know what to buy me for Christmas or Birthdays. I thought I would make her life easier. It is my job, after all. So Dear, here is the current list of stuff I would quite like.</p>\n    <h3>Books</h3>\n    <p>Unless specified all of these books are (I believe) available in paperback. The * means that I would be really, really grateful to receive this title as a present.<br />If you are stuck for somewhere to shop, can I recommend <a href="http://www.collinsbooks.com.au/">Collins Books</a>, they are lovely people. In the UK, I can't really go past <a href="http://www.amazon.co.uk/">Amazon</a>. Although for the more technical books <a href="http://www.compman.co.uk/">Computer Manuals Online</a> are very good.</p>"""))
    # AJT 22.02.2003 - Turn this into an auto-generated list
    cursor.execute(stmt, (61, "Wishlist books", "contents", """    <table>\n      <tr>\n        <td> </td>\n        <td><strong>Author</strong></td>\n        <td><strong>Title</strong></td>\n        <td><strong>Publisher, ISBN, etc</strong></td>\n      </tr>\n      <tr>\n        <td>*</td>\n        <td class="left">Christopher Alexander et al</td>\n        <td class="left">A Pattern Language</td>\n        <td></td>\n      </tr>\n      <tr>\n        <td> </td>\n        <td class="left">David Brin</td>\n        <td class="left">Sundiver</td>\n        <td></td>\n      </tr>\n      <tr>\n        <td> </td>\n        <td class="left">Richard Calder</td>\n        <td class="left">Dead Girls, Dead Boys, Dead Things</td>\n        <td></td>\n      </tr>\n      <tr>\n        <td>*</td>\n        <td class="left"><a href="http://www.atlsysguild.com/GuildSite/TDM/Tom_DeMarco.html">Tom DeMarco</a> &amp; Timothy Lister</td>\n        <td class="left"><a href="http://www.dorsethouse.com/books/pw.html">Peopleware</a></td>\n        <td class="left">Dorset House, 1999. ISBN: 0-932633-43-9</td>\n      </tr>\n      <tr>\n        <td> </td>\n        <td class="left">Charles H Ferguson</td>\n        <td class="left">High Stakes, No Prisoners: A Winners Tale of Greed and Glory in the Internet Wars</td>\n        <td class="left">Times Books. ISBN: 0812931432</td>\n      </tr>\n      <tr>\n        <td> </td>\n        <td class="left">Alan Furst</td>\n        <td class="left">Kingdom of Shadows</td>\n        <td class="left">ISBN: 0375758267</td>\n      </tr>\n      <tr>\n        <td> </td>\n        <td class="left">Richard P Gabriel</td>\n        <td class="left">Patterns of Software: Tales from the Software Community</td>\n        <td class="left">ISBN: 019510269X</td>\n      </tr>\n      <tr>\n        <td>*</td>\n        <td class="left">Adam Engst and Glen Fleishman</td>\n        <td class="left">Wireless Networking for Windows and Macintosh</td>\n        <td class="left">ISBN: 0321174089</td>\n      </tr>\n      <tr>\n        <td>*</td>\n        <td class="left"><a href="http://joeclark.org/">Joe Clark</a></td>\n        <td class="left"><a href="http://joeclark.org/book/">Building Accessible Websites</a></td>\n        <td class="left">ISBN: 073571150X</td>\n      </tr>\n      <tr>\n        <td> </td>\n        <td class="left">Witten, Moffat and Bell</td>\n        <td class="left"><a href="http://www.cs.mu.oz.au/mg/">Managing Gigabytes</a></td>\n        <td class="left">ISBN: 1558605703</td>\n      </tr>\n      <tr>\n        <td> </td>        <td class="left">Elizabeth David</td>\n        <td>An Omelette and a Glass of Wine</td>\n        <td> </td>\n      </tr>\n      <tr>\n        <td>*</td>\n        <td class="left">Elizabeth David</td>\n        <td>Elizabeth David Classics:&quot;Mediterranean Food&quot / &quot;French Country Cooking&quot; / &quot;Summer cooking&quot</td>\n        <td>Grub Street, ISBN: 1902304276</td>\n      </tr>\n    </table>"""))
    cursor.execute(stmt, (62, "Wishlist music", "contents", """    <h3>Music</h3>\n    <p>Spin me some discs my good man. Any of these will be a welcome addition to my <a href="http://www.archos.com/">gadget</a>. My format of choice is currently CD. I have bought music from <a href="http://www.hmv.co.uk/">HMV</a> in the past, just don't ask my Dad to test it out before you give it to me.</p>"""))
    # AJT 22.02.2003 - Turn this into an auto-generated list
    cursor.execute(stmt, (63, "Wishlist music", "media", """    <table>\n      <tr>\n        <td> </td>\n        <td><strong>Artist</strong></td>\n        <td><strong>Title</strong></td>\n      </tr>\n      <tr>\n        <td>*</td>\n        <td>It Bites</td>\n        <td>Big Lad in the Windmill</td>\n      </tr>\n      <tr>\n        <td> </td>\n        <td><a href="http://www.dodgy.co.uk/new.php">Dodgy</a></td>\n        <td>Free Peace Sweet</td>\n      </tr>\n      <tr>\n        <td>*</td>\n        <td><a href="http://www.lloydcole.com/">Lloyd Cole</a></td>\n        <td>Lloyd Cole 2001 (ltd edition boxed set)<br />Contains etc, Plastic Wood, Negatives, Live in New York</td>\n      </tr>\n    </table>"""))
    cursor.execute(stmt, (64, "Toys", "contents", """    <h3>Toys</h3>\n    <p>I'm a boy, and I like toys. Buy me one of these and I'll be grateful forever (well, for a couple of weeks anyway).</p>\n    <table>\n      <tr>\n        <td><a href="http://www.sennheiser.co.uk/mpindex31.htm#HD477">Sennheiser HD477 headphones</a></td>\n      </tr>\n      <tr>\n        <td><a href='http://www.amazon.co.uk/exec/obidos/ASIN/B00006JUIC/ref=sr_aps_electronics_1_1/202-0278339-9805417'>Logitech cordless mouse</a></td>\n      </tr>\n      <tr>\n        <td>I would like a <a href='http://www.moleskine.co.uk/styles.html'>Moleskine notebook</a> please. I like the square notebook. Either the standard or the large size is fine.</td>\n      </tr>\n      <tr>\n        <td>Some roasting tins from the nice people at <a href="http://www.mermaidcookware.com/">Mermaid cookware</a></td>\n      </tr>\n   </table>"""))
    cursor.execute(stmt, (70, "Whereabouts", "contents", """    <p>As we are no longer itinerants, this page is largely pointless. I've left it on the site mainly for nostalgic reasons. It may come back into its own at some time in the future, but until then feel free to remember the summer of 2002 with me;</p>\n    <table>\n      <tr>\n        <th>Date</th>\n        <th>Location</th>\n        <th>Comment</th>\n      </tr>\n      <tr>\n        <td>19.06.2002</td>\n        <td>Manly</td>\n        <td>Moving out of our house</td>\n      </tr>\n      <tr>\n        <td>20.06.2002 - 26.06.2002</td>\n        <td>New Zealand</td>\n        <td>Enjoying a week skiing in the best island of the best country in the world</td>\n      </tr>\n      <tr>\n        <td>30.06.2002</td>\n        <td>Chez Reeve</td>\n        <td>Ben and Robyn are hosting a Golden Jubilee celebration</td>\n      </tr>\n      <tr>\n        <td>01.07.2002</td>\n        <td>In the Air</td>\n        <td>We will be winging our way from Sydney to London on a paraffin budgie</td>\n      </tr>\n      <tr>\n        <td>04.07.2002 - 07.07.2002</td>\n        <td>Poynings</td>\n        <td>Off to expand &quot;The Parenting Pool&quot; at the Lewis family in Poynings, just outside Brighton.</td>\n      </tr>\n      <tr>\n        <td>07.07.2002 - 08.07.2002</td>\n        <td>Andover</td>\n        <td>Just popping in to see the Whistons on our way to visit the Todd family.</td>\n      </tr>\n      <tr>\n        <td>08.07.2002 - 12.07.2002</td>\n        <td>Exmouth</td>\n        <td>Staying with my Mum and Dad. We will be visiting venues, chatting to caterers and registering with the registrar. What fun.</td>\n      </tr>\n      <tr>\n        <td>12.07.2002 - 14.07.2002</td>\n        <td>London</td>\n        <td>Quality time in Balham - and why not. \n      </td>\n      </tr>\n      <tr>\n        <td>15.07.2002 - 22.07.2002</td>\n        <td>Portugal</td>\n        <td>A week at a luxury villa in the Algarve. By my reckoning, this will be our third free holiday of the year. Marvellous.</td>\n      </tr>\n      <tr>\n        <td>25.07.2002 - 26.07.2002</td>\n        <td>Shifnal, Shropshire</td>\n        <td>A visit to Mr East to inform him of his duties for the happy day. Jon is going to be our master of ceremonies and you would be surprised how many jobs that entitles him to.</td>\n      </tr>\n      <tr>\n        <td>26.07.2002 - 27.07.2002</td>\n        <td>The West Midlands</td>\n        <td>A couple of quality days <em>not in Dudley</em> with Matthew and Amy. During this visit Matthew and I will be venturing to the Merry Hill Centre to get team ties for the wedding. Oh, the joy. But the good news is that we are fitting in a <a href="http://www.francisdunnery.com/">Francis Dunnery</a> concert at the Midlands Art Centre on Saturday night. Superb, I can't wait.</td>\n      </tr>\n      <tr>\n        <td>28.07.2002</td>\n        <td>Exmouth</td>\n        <td>The Perrys are venturing to Devon for the day. After, or possibly during, the regal inspection of the wedding venues there will be a meeting of the parents. I'm hoping that will occur over lunch, but who knows.</td>\n      </tr>\n      <tr>\n        <td>30.07.2002</td>\n        <td>Pampering</td>\n        <td>Bobo and the rest of the Perry females are off to a health spa for the day. Anyone fancy joining me in the pub?</td>\n      </tr>\n      <tr>\n        <td>02.08.2002</td>\n        <td>Dry Runs</td>\n        <td>Bobo gets to try out her hair and makeup. I get to sit around and read the paper whilst waiting for her to finish.</td>\n      </tr>\n      <tr>\n        <td>04.08.2002</td>\n        <td>Lunch</td>\n        <td>The Perry family are assembling at Perry Mansions in Reading (well, all bar Lorna anyway) for lunch. I shall not be referring to anyone as &quot;the Spiv&quot;.</td>\n      </tr>\n      <tr>\n        <td>06.08.2002</td>\n        <td>Gratuitous Crawling</td>\n        <td>Happy Birthday Vikki. For those who don't know her, Vikki is my sister.</td>\n      </tr>\n      <tr>\n        <td>09.08.2002</td>\n        <td>More Bonding</td>\n        <td>The blushing bride is taking the Matron of Honour to meet the flower girl. They can then start the bonding process. I shall be spending some quality time with my laptop.</td>\n      </tr>\n      <tr>\n        <td>10.08.2002</td>\n        <td>Various</td>\n        <td>Celebrations of the impending nuptials in gender specific groups at seperate locations.</td>\n      </tr>\n      <tr>\n        <td>11.08.2002</td>\n        <td>Party</td>\n        <td>Richard, Belinda and Lucy Allen are hosting a soiree in Ealing. Apparently there will be lots of talk of what a wonderful school Ranelagh was.</td>\n      </tr>\n      <tr>\n        <td>16.08.2002</td>\n        <td>Devon</td>\n        <td>Apparently there is something going on this day, but I can't remember what it is</td>\n      </tr>\n      <tr>\n        <td>17.08.2002 - 24.08.2002</td>\n        <td>Who Knows?</td>\n        <td>The honeymoon. The smart money is on Skegness as the venue</td>\n      </tr>\n    </table>"""))
    cursor.execute(stmt, (121, "Photo 1 Title", "contents", "    <h1>We Got Engaged and we had a Party!</h1>\n    <p>Some pictures from our engagement party 24.02.2001</p>"))
    cursor.execute(stmt, (122, "Photo 1", "photos", ""))
    cursor.execute(stmt, (123, "Photo 2 Title", "contents", "    <h1>Christmass 2000 in the UK</h1>\n    <p>Click on any of the thumbnails to get a larger picture</p>"))
    cursor.execute(stmt, (124, "Photo 2", "photos", ""))
    cursor.execute(stmt, (125, "Photo 3 Title", "contents", "    <h1>Sydney Olympics</h1>\n    <p>Click on any of the thumbnails to get a larger picture</p>"))
    cursor.execute(stmt, (126, "Photo 3", "contents", "<p>This page under construction</p>"))
    cursor.execute(stmt, (127, "Photo 4 Title", "contents", "    <h1>Photos from Christmas 1999</h1>\n    <p>Action shots from Christmas 1999</p>"))
    cursor.execute(stmt, (128, "Photo 4", "photos", ""))
    cursor.execute(stmt, (129, "Photo 5 Title", "contents", "    <h1>More Festive Photos</h1>\n    <p>Photos from Boxing Day and New Years Eve 1999</p>"))
    cursor.execute(stmt, (130, "Photo 5", "photos", ""))
    cursor.execute(stmt, (131, "Photo 6 Title", "contents", "    <h1>A Yacht Called Resolute</h1>\n    <p>Photos from our boat</p>"))
    cursor.execute(stmt, (132, "Photo 6", "photos", ""))
    cursor.execute(stmt, (133, "Photo 7 Title", "contents", "    <h1>Christmases Gone By</h1>\n    <p>Photos from Christmas celebrations before 1999</p>"))
    cursor.execute(stmt, (134, "Photo 7", "photos", ""))
    cursor.execute(stmt, (135, "Photo 8 Title", "contents", "    <h1>The Rest</h1>\n    <p>Assorted Photos With No Home</p>"))
    cursor.execute(stmt, (136, "Photo 8", "photos", ""))
    cursor.execute(stmt, (137, "Photo 9 Title", "contents", "    <h1>Easter Bunny</h1>\n    <p>The trials of a stuffed toy</p>"))
    cursor.execute(stmt, (138, "Photo 9", "photos", ""))
    cursor.execute(stmt, (139, "Photo 10 Title", "contents", "    <h1>Another Party</h1>\n    <p>We were leaving town and they threw a party</p>"))
    cursor.execute(stmt, (140, "Photo 10", "photos", ""))
    cursor.execute(stmt, (142, "Photo 11", "photos", ""))
    cursor.execute(stmt, (144, "Photo 12", "photos", """    <p>All of the images on this page are copyright <a href="http://www.mjbrowne.co.uk/">Mike Browne</a>. He is a mighty fine photographer, as you can see from his work here. If you are in the UK and you need some pictures taken he is definitely your man.</p>"""))
    cursor.execute(stmt, (146, "Photo 13", "photos", """    <p>These are for all of the people on the course; Ali, Donna, Kathy, Linda, Paula, Suzi and not forgetting Alex, Peter and Di</p>"""))
    # A link between pages and sections. Most pages will have sections 1,2,3 at
    # the end, forming a navbar
    # Start page_sections
    stmt = """INSERT INTO page_sections
                (page_id, section_id, section_order, div_label) 
              VALUES 
                (?, ?, ?, ?)"""
    for page in (1,2,3,4,5,6,7,21,22,23,24,25,26,27,28,29,30,31,32,33):
        cursor.execute(stmt, (page, 91, 97, "links"))
        cursor.execute(stmt, (page, 92, 98, "links"))
        cursor.execute(stmt, (page, 93, 99, "links"))
    cursor.execute(stmt, (1, 11, 2, "contents"))
    cursor.execute(stmt, (2, 20, 2, "contents"))
    cursor.execute(stmt, (2, 21, 3, "contents"))
    cursor.execute(stmt, (3, 30, 2, "contents"))
    cursor.execute(stmt, (3, 31, 3, "contents"))
    cursor.execute(stmt, (3, 32, 4, "contents"))
    cursor.execute(stmt, (4, 40, 2, "contents"))
    cursor.execute(stmt, (4, 41, 3, "contents"))
    cursor.execute(stmt, (5, 50, 2, "contents"))
    cursor.execute(stmt, (6, 60, 2, "contents"))
    cursor.execute(stmt, (6, 61, 3, "contents"))
    cursor.execute(stmt, (6, 62, 4, "contents"))
    cursor.execute(stmt, (6, 63, 5, "contents"))
    cursor.execute(stmt, (6, 64, 6, "contents"))
    cursor.execute(stmt, (7, 70, 2, "contents"))
    cursor.execute(stmt, (21, 122, 2, "contents"))
    cursor.execute(stmt, (22, 124, 2, "contents"))
    cursor.execute(stmt, (23, 126, 2, "contents"))
    cursor.execute(stmt, (24, 128, 2, "contents"))
    cursor.execute(stmt, (25, 130, 2, "contents"))
    cursor.execute(stmt, (26, 132, 2, "contents"))
    cursor.execute(stmt, (27, 134, 2, "contents"))
    cursor.execute(stmt, (28, 136, 2, "contents"))
    cursor.execute(stmt, (29, 138, 2, "contents"))
    cursor.execute(stmt, (30, 140, 2, "contents"))
    cursor.execute(stmt, (31, 142, 2, "contents"))
    cursor.execute(stmt, (32, 144, 2, "contents"))
    cursor.execute(stmt, (33, 146, 2, "contents"))
    # Specify what the links are
    # Start links
    stmt = """INSERT INTO links( link_id, section_id, to_page_id, to_url, to_url_title, to_photo_id, to_media_id, valid ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"""
    cursor.execute(stmt, (0, 91, 1, "", "", "", "", "Y"))
    cursor.execute(stmt, (1, 91, "", "diary", "Diary", "", "", "Y"))
    cursor.execute(stmt, (2, 91, 2, "", "", "", "", "Y"))
    cursor.execute(stmt, (3, 91, 3, "", "", "", "", "Y"))
    cursor.execute(stmt, (4, 91, 4, "", "", "", "", "Y"))
    cursor.execute(stmt, (5, 91, 5, "", "", "", "", "Y"))
    cursor.execute(stmt, (6, 91, 6, "", "", "", "", "Y"))
    cursor.execute(stmt, (7, 91, 7, "", "", "", "", "Y"))
    cursor.execute(stmt, (10, 92, "", "http://www.google.com", "Google", "", "", "Y"))
    cursor.execute(stmt, (11, 92, "", "http://news.bbc.co.uk", "BBC News", "", "", "Y"))
    cursor.execute(stmt, (12, 92, "", "http://www.abc.net.au", "ABC", "", "", "Y"))
    cursor.execute(stmt, (13, 93, "", "http://validator.w3.org/check/referer", "Valid XHTML 1.0", "", "", "Y"))
    cursor.execute(stmt, (14, 93, "", "http://www.cornerhost.com/", "Hosted by Cornerhost", "", "", "Y"))
    cursor.execute(stmt, (18, 21, 33, "", "Cooking Holiday", "", "", "Y"))
    cursor.execute(stmt, (19, 21, 32, "", "Wedding Photos", "", "", "Y"))
    cursor.execute(stmt, (20, 21, 31, "", "Early 2003", "", "", "Y"))
    cursor.execute(stmt, (21, 21, 30, "", "Farewell to Sydney Dinner", "", "", "Y"))
    cursor.execute(stmt, (22, 21, 29, "", "The Easter Bunny Chronicles", "", "", "Y"))
    cursor.execute(stmt, (23, 21, 21, "", "Engagement Party", "", "", "Y"))
    cursor.execute(stmt, (24, 21, 22, "", "Christmas 2000", "", "", "Y"))
    cursor.execute(stmt, (25, 21, 23, "", "Sydney Olympics", "", "", "Y"))
    cursor.execute(stmt, (26, 21, 24, "", "Christmas 1999", "", "", "Y"))
    cursor.execute(stmt, (27, 21, 25, "", "Boxing Day and New Years Eve 1999", "", "", "Y"))
    cursor.execute(stmt, (28, 21, 26, "", "Photos from our Boat", "", "", "Y"))
    cursor.execute(stmt, (29, 21, 27, "", "Older Christmas Pictures", "", "", "Y"))
    cursor.execute(stmt, (30, 21, 28, "", "Miscellaneous", "", "", "Y"))
    # Start photos
    stmt = """INSERT INTO photos( photo_id, thumbnail_url, picture_url, alt_tag, description ) VALUES ( ?, ?, ?, ?, ? )"""
    cursor.execute(stmt, (1, "images/stengagement001.jpg", "images/engagementparty01.jpg", "Try and look normal Adam", "Early in the evening everyone was refined and well behaved. Except this mob of course."))
    cursor.execute(stmt, (2, "images/stengagement002.jpg", "images/engagementparty02.jpg", "Mummy, what did you do before I came along?", "Cathy Jones, in the full flight of pregnancy, was our responsible adult for the evening. Well, she managed to steer Chris and I home safely."))
    cursor.execute(stmt, (3, "images/stengagement003.jpg", "images/engagementparty03.jpg", "Hello Everybody", "At the party there was lots of jolly talking. Here we find, amongst others; Robin, Emma, Ben and Jackie smiling happily for the camera in the middle of a discussion of the merits of existentialism in modern corporate thinking."))
    cursor.execute(stmt, (4, "images/stengagement004.jpg", "images/engagementparty04.jpg", "Its the Davis'", "Adam and Jo reclining in the sumptuous surroundings of Middle Harbour Yacht club. The quarterdeck room to be precise."))
    cursor.execute(stmt, (5, "images/stengagement005.jpg", "images/engagementparty05.jpg", "The Ladies", "Kate and Debbie taking a breather. Phew, the (talking) action was non-stop."))
    cursor.execute(stmt, (6, "images/stengagement006.jpg", "images/engagementparty06.jpg", "More Ladies", "Sushila and Jo took time out from sharing Oracle Financials tips for this shot."))
    cursor.execute(stmt, (7, "images/stengagement007.jpg", "images/engagementparty07.jpg", "The Allens", "Richard and Belinda were in fine form. They took time out from busy socialising to pose for this picture"))
    cursor.execute(stmt, (8, "images/stengagement008.jpg", "images/engagementparty08.jpg", "Cheesy Grins", "Bobo, Anthony, Jackie, Chris and Lynne bring out their best teeth out poses for the camera."))
    cursor.execute(stmt, (9, "images/stengagement009.jpg", "images/engagementparty09.jpg", "Look at my rock", "The charming host and hostess pose for a 'quality' picture. Note the prominent position of Bobo's left hand as she shows off her engagement ring. Money well spent I'm reliably informed."))
    cursor.execute(stmt, (10, "images/stengagement010.jpg", "images/engagementparty10.jpg", "More Shmoo Please", "Bobo and Fiona examine the quality of the champagne. Apparently it was satisfactory. Whilst we are here, please admire Fiona's handbag - it was a birthday present you know."))
    cursor.execute(stmt, (11, "images/stengagement011.jpg", "images/engagementparty11.jpg", "Ransom", "The Geezer here is holding Bobo hostage until he can acquire more booze. Little did he know that the champagne was complimentary all night. Boy did he look sheepish when he found out."))
    cursor.execute(stmt, (12, "images/stengagement012.jpg", "images/engagementparty12.jpg", "Hmmm", "Jon Palmer and I try and decide if we should have another drink. After a long period of contemplation we decided the answer was emphatically - YES!"))
    cursor.execute(stmt, (13, "images/stengagement013.jpg", "images/engagementparty13.jpg", "Luvverly Jubbly", "Gary and the Geezer enjoy the free schmoo whilst Michael looks on and I helpfully offer to show them where the bar is. I have been told I am nothing if not considerate."))
    cursor.execute(stmt, (14, "images/stengagement014.jpg", "images/engagementparty14.jpg", "Cheers", "Fiona and I were definitely in agreement that the free champagne was 'mighty fine'. She was even performing the 'wine testers pout' to check the body of the wine as well. What dedication."))
    cursor.execute(stmt, (15, "images/stengagement015.jpg", "images/engagementparty15.jpg", "Ladies Love Cool Dave", "Here we have the Budgie and his&quot;ladies&quot;. Its OK girls, he is still single."))
    cursor.execute(stmt, (16, "images/stengagement016.jpg", "images/engagementparty16.jpg", "Grin", "Finally, another completely unstaged photo shows us (from the rear) Ben, Robin, Gary, Fiona and Bobo. We can be sure from this photo that a good time was had by all."))
    cursor.execute(stmt, (17, "images/stukchristmas001.jpg", "images/ukchristmas01.jpg", "We're in the sky", "A picture of Bobo and Lorna on the London Eye. Can you tell they are sisters? A fine ride and much fun for all. We highly recommend it."))
    cursor.execute(stmt, (18, "images/stukchristmas002.jpg", "images/ukchristmas02.jpg", "So whats all the fuss about?", "We went to the Millenium Dome. Wasn't it nice of the government to jobs for all of those unemployed east enders. Even if it was only for a year. In a silly outfit. For the minimum possible wage ..."))
    cursor.execute(stmt, (19, "images/stukchristmas003.jpg", "images/ukchristmas03.jpg", "Trunks!", "Did I say the UK? Well, we managed a side trip to Copenhagen. Visiting such a cultural centre it would be rude not to visit the local brewery. In this case Ny Carlsberg. Hmmm, lager."))
    cursor.execute(stmt, (20, "images/stukchristmas004.jpg", "images/ukchristmas04.jpg", "Elephants", "Another shot of me between two elephants at the Carlsberg brewery. Gunnar and Lise look on in a slightly bemused manner."))
    cursor.execute(stmt, (21, "images/stukchristmas005.jpg", "images/ukchristmas05.jpg", "Lager", "Yet another shot of the gates to the Carlsberg brewery. Unfortunately it was shut that day, luckily we managed to pop back the next day and undertake the arduous tour, culminating in a couple of cold ones at the cellar door."))
    cursor.execute(stmt, (22, "images/stukchristmas006.jpg", "images/ukchristmas06.jpg", "Mermaid", "Another obligatory stop is by the statue of the little mermaid. This was put up after Hans Christian Andersen wrote the story. See if you can guess which part has been stolen twice."))
    cursor.execute(stmt, (23, "images/stukchristmas007.jpg", "images/ukchristmas07.jpg", "Viking", "Gunnar and Lise kindly took us to the Viking museum. Here they have rescued a number of boats from the fjord and tried to reconstruct them. Bobo here is trying to compare the sea going capabilities of this ship compared to Resolute."))
    cursor.execute(stmt, (24, "images/stukchristmas008.jpg", "images/ukchristmas08.jpg", "Sparkly", "Finally from Copenhagen, here is a lovely shot from the Tivoli gardens. Every year they decorate the gardens with lots of festive lights and chestnut sellers. Lovely."))
    cursor.execute(stmt, (25, "images/stukchristmas009.jpg", "images/ukchristmas09.jpg", "Look, baby", "A picture of Bobo with her niece Madeline Lewis. Maddy here is two days old and wondering just who this bruised person holding her is. Note, the mark on Bobo's nose was self inflicted, with the help of the kitchen cupboards at her Mum and Dads house."))
    cursor.execute(stmt, (26, "images/stukchristmas010.jpg", "images/ukchristmas10.jpg", "Stonehenge", "You have to do the odd tourist trip, even when visting the family. On the way to Devon we stopped off at Stonehenge for a cup of coffee and a photo opportunity."))
    cursor.execute(stmt, (27, "images/stukchristmas011.jpg", "images/ukchristmas11.jpg", "More Lager", "The next few images are from a cultured evening spent in various pubs around Exmouth. As you can see from this picture Donny and I spent a long time discussing the merits of greater economic integration with Europe."))
    cursor.execute(stmt, (28, "images/stukchristmas012.jpg", "images/ukchristmas12.jpg", "Scotsman", "Donny decided to go solo and encapsulated our discussion in song. I believe this was the second verse. An alternative description of this photo is that he is saying&quot;Let me tell you, I will tell you.&quot;I leave the choice to the discerning visitor."))
    cursor.execute(stmt, (29, "images/stukchristmas013.jpg", "images/ukchristmas13.jpg", "Wa-hey", "Mr Molland here is informing the team of the state of the UK market for discounted new cars. Mind you, he could just be grinning from the preceding eight pints of <a href=http://www.londonslang.com/>Nelson</a>."))
    cursor.execute(stmt, (30, "images/stukchristmas014.jpg", "images/ukchristmas14.jpg", "Cheese!", "A picture of the contented imbibers gathered at the Royal Beacon Hotel. Good to see that Robert is still behind the bar after all of these years. The man in the orange coat is Matthew, and we are very worried that his face may stay like that if the wind changes."))
    cursor.execute(stmt, (31, "images/stukchristmas015.jpg", "images/ukchristmas15.jpg", "Cheese! (again)", "Christmas Day in the Todd household is always a relaxed and carefree event. Here we are playing one of our favourite games -&quot;Stay still and smile in a scary way&quot;. I'd buy a used car from any of these people."))
    cursor.execute(stmt, (32, "images/stukchristmas016.jpg", "images/ukchristmas16.jpg", "Snap!", "Phoebe and Madeline's two grandfathers combine to solve the arduous task of finding the pairs in this pack of cards. It only took half an hour for them to complete matching, I believe Phoebe can now do it in five minutes."))
    cursor.execute(stmt, (33, "images/stukchristmas017.jpg", "images/ukchristmas17.jpg", "Breathe deeply", "Phoebe Lewis and Uncle John show Daddy how to breathe through a nose pack of blu-tack. An essential skill if you spend a lot of time at the bottom of a ruck."))
    cursor.execute(stmt, (34, "images/stukchristmas018.jpg", "images/ukchristmas18.jpg", "I can't feel my feet", "Cold? Cold? Certainly blooming was. Luckily the snow didn't come down until the morning of our last day in the UK. The bad news was that this meant that all of the roads in Berkshire were shut.  Strangely enough, as soon as we passed over the border into Surrey this was no longer a problem.  Must have been caused by a grit shortage in Reading or something."))
    cursor.execute(stmt, (35, "images/stchristmas001.jpg", "images/christmas01.jpg", "Christmas Eve at home", "Bobo here is a picture of contentment on Christmas Eve as she surveys all of the presents she will get to open tomorrow.  My present was at the bottom of the pile."))
    cursor.execute(stmt, (36, "images/stchristmas002.jpg", "images/christmas02.jpg", "The picture of manhood", "After frolicking on the beach for a couple of hours on Christmas Day we repaired to the Gladstone's house.  Gary is pictured here surveying the pool whilst also keeping a vigilant eye on the barbecue."))
    cursor.execute(stmt, (37, "images/stchristmas004.jpg", "images/christmas04.jpg", "Strange man in a pool", "Whilst Gary was keeping an eye on the turkey our host decided to get in the Christmas spirit by taking a dip with a festive hat on.  Shame about the goggles though."))
    cursor.execute(stmt, (38, "images/stchristmas005.jpg", "images/christmas05.jpg", "Water Babies", "Just showing that love of the water starts early in this country. Guess who didn't need extra bouyancy? I, meanwhile, am running for cover in case Bobo gets any ideas."))
    cursor.execute(stmt, (39, "images/stchristmas003.jpg", "images/christmas03.jpg", "A bit of sharking", "When we had exhausted their patience we went back to the Whistons for dangerous cocktails.  Here Gary is letting Jon and I share a fresh batch of Mango Daquiris.  The sharks were our Christmas presents and pretty funky they are too."))
    cursor.execute(stmt, (40, "images/stboxing001.jpg", "images/boxing01.jpg", "Boxing Day at home", "On Boxing day we cooked a traditional Christmas roast dinner, with a twist. The twist being that the turkey was cooked on the barbecue. But who cares, look at that lovely pile of brussel sprouts."))
    cursor.execute(stmt, (41, "images/stboxing002.jpg", "images/boxing02.jpg", "Lots and lots of lovely food", "Look at all of that lovely food. Who could resist such culinary delights? Well, Gary and Fiona obviously couldn't."))
    cursor.execute(stmt, (42, "images/stboxing003.jpg", "images/boxing03.jpg", "Just a little rest", "Just to prove who does all of the work around here, Bobo has a quick sit down after her sterling efforts in the kitchen. Don't mention the dirty feet though!"))
    cursor.execute(stmt, (43, "images/stnewyear001.jpg", "images/newyear01.jpg", "Jonny where's your trousers", "Moving on to New Years Eve, Richard and Belinda hosted a black tie party. Mr Palmer found his black tie, its just a shame about his trousers.  We tried to tell him, but he claimed it was a fashionable look. Any and all captions are welcome."))
    cursor.execute(stmt, (44, "images/stnewyear002.jpg", "images/newyear02.jpg", "Fridge posing", "Its amazing what a few drinkies can do. Emma, Jon and Richard show us all how it should be done - and they are in the kitchen. Luckily we ram out of film before they started entertaining in the lounge!"))
    cursor.execute(stmt, (45, "images/stsailing001.jpg", "images/sailing01.jpg", "The skipper at the wheel", "Mistress of all she surveys. Bobo pictured piloting Resolute on the delightful Pittwater."))
    cursor.execute(stmt, (46, "images/stsailing002.jpg", "images/sailing02.jpg", "A little light luncheon", "After a hard morning sailing we moored up in the basin for lunch. Then the crew took a suitable time recovering from their exertions before we set off for the afternoon sail."))
    cursor.execute(stmt, (47, "images/stsailing003.jpg", "images/sailing03.jpg", "The card and bottle game", "That evening, Jon and I retired to the cockpit for a quiet pre dinner card and bottle game. Funnily enough I can't remember what dinner was or what it tasted like."))
    cursor.execute(stmt, (48, "images/stsailing004.jpg", "images/sailing04.jpg", "The visitor at the helm", "Just to prove that all of those sailing stories are true, Jon takes the wheel of Resolute. What this photo doesn't show is that we were at anchor at the time."))
    cursor.execute(stmt, (49, "images/stoldxmas001.jpg", "images/oldxmas01.jpg", "The family Todd", "Yes, Iain and Vikki did make it to Sydney, and, yes, we took the classic tourist photo from Mrs Macquarie's chair. Everyone smile now please."))
    cursor.execute(stmt, (50, "images/stoldxmas002.jpg", "images/oldxmas02.jpg", "Happy Christmas", "This was taken early on Christmas Day morning 1998. Vikki was glad to be in Australia, I was still asleep. Its just lucky that someone had given me a Crown."))
    cursor.execute(stmt, (51, "images/stoldxmas003.jpg", "images/oldxmas03.jpg", "Skirt Wearing Nancy Boys", "Later in the day the beer started to kick in. I thought I was hallucinating when people in skirts turned up, but luckily I have this photographic proof. By the way, the bloke in the dress comes from Walton Upon Thames."))
    cursor.execute(stmt, (52, "images/stoldxmas004.jpg", "images/oldxmas04.jpg", "Wow, what a shirt", "Gunnar proves that you can't look good wearing a female rash vest after several bottles of Crown lager. It is nice to know that he has grown up since this photo was taken."))
    cursor.execute(stmt, (53, "images/stoldxmas005.jpg", "images/oldxmas05.jpg", "Jumping into the New Year", "New Years Eve 1998. This photo was taken at about 15 seconds to midnight. To the left you see the Danish boys celebrating the traditional way by&quot;leaping into the New Year&quot;. I still think they were making it up after all of that vodka."))
    cursor.execute(stmt, (54, "images/stmiscellaneous001.jpg", "images/miscellaneous01.jpg", "Bye Bye Jonny, Bye Bye", "We arranged a farewell dinner and drinkies for Mr East. Unfortunately he got his dates wrong and was on a plane as we held it. Jon, I promised you photos and here they are. Mrs Whiston is receiving treatment for her condition."))
    cursor.execute(stmt, (55, "images/stmiscellaneous002.jpg", "images/miscellaneous02.jpg", "Kiddies", "One for the Perrys, here are Phoebe Lewis and Charlie Perry in all of their glory on our web page. For those who are unfamiliar with the relations these are Bobo's niece and nephew."))
    cursor.execute(stmt, (56, "images/stmiscellaneous003.jpg", "images/miscellaneous03.jpg", "Me and Molly", "The only extant photograph of me and Mr Molland on the turps. Looking quite good I'd say."))
    cursor.execute(stmt, (57, "images/stmiscellaneous004.jpg", "images/miscellaneous04.jpg", "2 Jonny Palmers", "Thereareonly two Jonny Palmers. Here is the photographic proof."))
    cursor.execute(stmt, (58, "images/stFamilyReeve.jpg", "images/FamilyReeve.jpg", "The Reeve Family", "Ben complained because there were no pictures of his family on this web site. Here you go."))
    cursor.execute(stmt, (59, "images/Bunny_0101.jpg", "images/Bunny_01.jpg", "An empty plate", "The Reeve family invited us to lunch on Easter Sunday.  Always happy to take up an offer of a free meal we were around there faster than Ben could light the barbecue.  This picture shows the quality of the repast on offer.  A restraining order had to be taken out to separate Jonny Palmer from the crunchy roast potatoes."))
    cursor.execute(stmt, (60, "images/Bunny_0201.jpg", "images/Bunny_02.jpg", "Bunny looking in the gravy boat", "We are not completely heartless.  We took Milly a present, a lovely, cuddly, easter bunny rabbit.  Sadly she didn't want to play with it so Mr Palmer and I decided to let him run riot around the dinner table.  He was a little miffed that we had eaten all of the food though and started a quest to clean up the crumbs.  His first stop was the gravy boat, but he had no luck there as we had polished off the lot."))
    cursor.execute(stmt, (61, "images/Bunny_0301.jpg", "images/Bunny_03.jpg", "Bunny tries a little red wine", "With no food, what is a bunny to do? Go for the red wine, obviously. A cheeky, fruity number from someone in Australia, possibly even the Hunter Valley was the first port of call. Jon and I did try and discourage the bunny from hitting the turps but he was quite insistent. He started mumbling something about &quot;being able to understand you lot a bit more easily&quot; and started slurping."))
    cursor.execute(stmt, (62, "images/Bunny_0401.jpg", "images/Bunny_04.jpg", "Hot bunny injection", "I think the red wine got the better of our intrepid bunny and he started branching out. No one else had tried the mustard so he decided to get up close and personal. Gazes were averted at this point as what he was attempting to do should not be witnessed in polite company. Apparently this picture should be captioned&quot;Hot Bunny Injection&quot;- thanks Mr Palmer."))
    cursor.execute(stmt, (63, "images/Bunny_0501.jpg", "images/Bunny_05.jpg", "Bunny quenches the fire within", "Bunny discovered that mustard is quite hot. After running around the table panting and shouting &quot;hot, hot, hot&quot; he stumbled across a glass of water. We think it was there for one of the mothers, as everyone else was far too entranced with the vino. Still, it seemed to calm our cuddly friend down and he settled down for a few sips and then closed his eyes - only for a moment mind you."))
    cursor.execute(stmt, (64, "images/Bunny_0601.jpg", "images/Bunny_06.jpg", "The best chardonnay in the world", "After a rest and a bit of recuperation what is a bunny about the table supposed to do? Why, head for the best chardonnay in the world of course. Anything else would have been an anti-climax. This wasn't the end of our large eared friend's antics for the day, but he spotted our intrepid photographer and we had to stop taking pictures at this point."))
    cursor.execute(stmt, (65, "images/stLP001.jpg", "images/LP001.jpg", "In the pub", "Before the meal, we assembled in the Mosman hotel for a couple of cleansing ales."))
    cursor.execute(stmt, (66, "images/stLP002.jpg", "images/LP002.jpg", "Still in the pub", "Here are Mr Buck and Mr Davis."))
    cursor.execute(stmt, (67, "images/stLP003.jpg", "images/LP003.jpg", "A lovely cake", "Belinda's mum baked us a cake. Thanks Mrs Sinclair."))
    cursor.execute(stmt, (68, "images/stLP004.jpg", "images/LP004.jpg", "At the table", "We are in the restaurant now. Say hello to the Geezer and Debbie."))
    cursor.execute(stmt, (69, "images/stLP005.jpg", "images/LP005.jpg", "Mark and Sophie", "Messrs Templeton and Creasey were a late entrant. Apparently it was all my fault that they didn't get invited. Bad Andy."))
    cursor.execute(stmt, (70, "images/stLP006.jpg", "images/LP006.jpg", "The Buck-Jones'", "Chris Buck and Cathy Jones. Chris thinks his shirt is trendy, we chose not to tell him that he is an eighties throwback."))
    cursor.execute(stmt, (71, "images/stLP007.jpg", "images/LP007.jpg", "Richard and Kevin", "Fancy a database? These two will build you one in a flash. See hello to our partners in Oracle, Richard Stott and Kevin Vaz."))
    cursor.execute(stmt, (72, "images/stLP008.jpg", "images/LP008.jpg", "A selection of diners", "From the left; Jon Palmer, Brigitte Gladstone and Diane Hiles. If you look at the full size photo you will see even more of the people at the meal."))
    cursor.execute(stmt, (73, "images/stLP009.jpg", "images/LP009.jpg", "Geezers head", "The back of the Geezer's head. What a fine photo this is. That must mean that I took it."))
    cursor.execute(stmt, (74, "images/stLP010.jpg", "images/LP010.jpg", "People eating", "Some people enjoying the fine fare provided by Corbinos. Apart from Chris, who didn't stop talking all night."))
    cursor.execute(stmt, (75, "images/stLP011.jpg", "images/LP011.jpg", "Bobo", "Bobo is seen here contemplating the inside of her eyelids."))
    cursor.execute(stmt, (76, "images/stLP012.jpg", "images/LP012.jpg", "Ciaran", "Say hello to Ciaran Hennessy."))
    cursor.execute(stmt, (77, "images/stLP013.jpg", "images/LP013.jpg", "The budgie and stotty", "The budgie is the one with the wine glass, the distinguished looking gentleman is called Richard. Bless."))
    cursor.execute(stmt, (78, "images/stLP014.jpg", "images/LP014.jpg", "Alison and Ben", "Alison and Ben. Later in the evening Ben was spotted in the pub drinking Gin and Red Bull. The man is an animal."))
    cursor.execute(stmt, (79, "images/stLP015.jpg", "images/LP015.jpg", "Bobo and Emma", "Bobo and Emma, a self portrait. Aren't they lovely?"))
    cursor.execute(stmt, (80, "images/stLP016.jpg", "images/LP016.jpg", "Bobo and Emma take 2", "Second time lucky."))
    cursor.execute(stmt, (81, "images/stLP017.jpg", "images/LP017.jpg", "Kevin", "Here is Kevin Vaz, I think he must have been listening to one of the Budgies stories at this point."))
    cursor.execute(stmt, (82, "images/stLP018.jpg", "images/LP018.jpg", "Me and a roll", "There always has to be a picture of an unfeasibly shaped object. Just be thankful it wasn't an amusing vegetable."))
    cursor.execute(stmt, (83, "images/stLP019.jpg", "images/LP019.jpg", "Richard", "Richard being so casual. It comes very easily to him."))
    cursor.execute(stmt, (84, "images/stLP020.jpg", "images/LP020.jpg", "Bobo Scary", "Someone told Bobo all the food was low fat."))
    cursor.execute(stmt, (85, "images/stLP021.jpg", "images/LP021.jpg", "Richard Allen", "Richard Allen. Father and speech maker. Marvellous."))
    cursor.execute(stmt, (86, "images/stLP022.jpg", "images/LP022.jpg", "Nearly done", "Bobo is caught on her travels around the table. Here she is pictured with Richard and Christopher J Rath esq."))
    cursor.execute(stmt, (87, "images/thJan2003_001.png", "images/Jan2003_001.jpg", "Benjamin Brian Reeve", "We landed in Sydney on the 30th of December, 2002 and after the obligatory nap our first engagement was New Years Eve. As ever, it was graciously hosted by the Reeve family. Here is a picture of the patriarch Benjamin Brian Reeve. I would trust this man to train my staff, oh yes I would."))
    cursor.execute(stmt, (88, "images/thJan2003_002.png", "images/Jan2003_002.jpg", "Milly Reeve", "The highlight of New Years Eve in Sydney are the fireworks in the harbour. There is a big display at 9pm and a few sparks at midnight. Milly came with us to see the nine o'clock show, which was cancelled due to high winds. Her Dad stayed at home claiming fatigue, the big wuss."))
    cursor.execute(stmt, (89, "images/thJan2003_003.png", "images/Jan2003_003.jpg", "Reeve Mansions", "The highlight of the evening was watching television. In years gone past there would have been drinking, dancing, jumping off chairs and probably carpet molestation. Either we are getting more mature or have given up any pretensions to being party animals. Of course, the fact that we started the day with lunch at the Watermark may have had some effect on our energy levels."))
    cursor.execute(stmt, (90, "images/thJan2003_004.png", "images/Jan2003_004.jpg", "Barmy Army", "Our next ritual social occassion was the start of the test match on the 2nd of January. Note my patriotic attire. Sadly we didn't get to see a Darren Gough hat-trick this time, but England did manage to win the game."))
    cursor.execute(stmt, (91, "images/thJan2003_005.png", "images/Jan2003_005.jpg", "Gary G Whiston esq", "I just couldn't resist posting this picture of this fine figure of manhood, Gary Whiston. That is his daughter in the corner running to get the rescue team to roll him back into the sea."))
    cursor.execute(stmt, (92, "images/thJan2003_006.png", "images/Jan2003_006.jpg", "My car", "I sold my car. Bah humbug. If you have it now please make sure you look after it."))
    cursor.execute(stmt, (93, "images/thJan2003_007.png", "images/Jan2003_007.jpg", "Maddie Lewis", "We are back in blighty here. In february we helped the in laws celebrate their ruby wedding anniversary. Here is a picture of their grand-daughter (and my niece by marriage) Madeline Lewis. Isn't she sweet. Of course she was throwing a tanty for most of the day, apart from this brief on camera interlude."))
    cursor.execute(stmt, (94, "images/thJan2003_008.png", "images/Jan2003_008.jpg", "The happy couple", "Here we have Mr and Mrs Perry cutting their cake. Very nice it was too. Thanks for a lovely lunch, and afternoon tea."))
    cursor.execute(stmt, (95, "images/thWedding01.jpg", "images/Wedding01.jpg", "Mr Pink, Mr Green and Mr 70s", "An image straight from a Quentin Tarantino film as the gentlemen assemble prior to the off"))
    cursor.execute(stmt, (96, "images/thWedding02.jpg", "images/Wedding02.jpg", "Suits you sir", "Were you out with a lady last night sir? No, well step this way through the gatehouse to our venue"))
    cursor.execute(stmt, (97, "images/thWedding03.jpg", "images/Wedding03.jpg", "the bridal party", "The bridal party assembles before the ceremony. From the left we have the blushing bride, her father, the matron of honour (Mrs Emma Palmer) and the flower girl (Phoebe Lewis)"))
    cursor.execute(stmt, (98, "images/thWedding04.jpg", "images/Wedding04.jpg", "Walking down the aisle", "The first photo of Mr and Mrs Andrew J Todd esq. The room is the dining room of <a href='http://www.powderham.co.uk/'>Powderham Castle</a>."))
    cursor.execute(stmt, (99, "images/thWedding05.jpg", "images/Wedding05.jpg", "Posed? Surely not", "The official wedding photo. Don't they make a lovely couple."))
    cursor.execute(stmt, (100, "images/thWedding06.jpg", "images/Wedding06.jpg", "Ankle Biters", "The bride and groom with assembled nieces and nephews. Take a bow (from the left) Lucy Perry, Harry Perry, Phoebe Lewis, Charlie Perry and the ever smiling Madeline Lewis"))
    cursor.execute(stmt, (101, "images/thWedding07.jpg", "images/Wedding07.jpg","The Perry Family", "The Perry Family assembled for a group photo. From the rear left Nigel Lewis, Maddie Lewis, Giles Perry, Peter Perry, Julia Lewis, Pat Perry, The wife, yours truly, Stella Perry, Lorna Perry, Nick Perry, Pat Perry. In the front row Phoebe Lewis, Lucy Perry, Charlie Perry and Harry Perry"))
    cursor.execute(stmt, (102, "images/thWedding08.jpg", "images/Wedding08.jpg", "The Todd Family", "The Todd Family assembled for a group photo. From the rear left Mark Ramsbottom, Victoria Clare Todd, Pat Slade, John Todd, The wife, yours truly, Helen Todd, Lynn Todd, Brian Todd and in the front - hang on, there is a blow in - Phoebe Lewis"))
    cursor.execute(stmt, (103, "images/thWedding09.jpg", "images/Wedding09.jpg", "The Wedding Party", "From the rear left, the master of ceremonies Mr Jon East, yours truly, The Wife, the matron of honour Mrs Emma Palmer, the best Man Mr Matthew &quot;Seventies Throwback&quot; Molland and the flower girl Phoebe Lewis"))
    cursor.execute(stmt, (104, "images/thLeBaou_005.jpg", "images/LeBaou_005.jpg", "A rare moment of rest", "The student, ever busy, snatches a moment of respite under the cooling shade of the wisteria"))
    cursor.execute(stmt, (105, "images/thLeBaou_009.jpg", "images/LeBaou_009.jpg", "The walking partners", "Fiona takes this opportunity to pose for the camera. Rosie was merely still on the prowl for more snacks."))
    cursor.execute(stmt, (106, "images/thLeBaou_012.jpg", "images/LeBaou_012.jpg", "The kitchen", "The scene of our culinary triumphs. Oh, and Alex does the occasional bit of cooking in there too."))
    cursor.execute(stmt, (107, "images/thLeBaou_014.jpg", "images/LeBaou_014.jpg", "The bouillabaisse", "For the unintiated, this is fish stew. The cultured would call it bouillabaisse, and it was truly scrumptious."))
    cursor.execute(stmt, (108, "images/thLeBaou_015.jpg", "images/LeBaou_015.jpg", "Turning", "The dish is tarte tartin, and it is cooked upside down. Here I demonstrate the perfect turning technique prior to serving."))
    cursor.execute(stmt, (109, "images/thLeBaou_016.jpg", "images/LeBaou_016.jpg", "Turning complete", "Et voila. The tarte is turned and ready to be consumed. It was very nice indeed."))
    cursor.execute(stmt, (110, "images/thLeBaou_019.jpg", "images/LeBaou_019.jpg", "At work", "The team working in the kitchen. It was tough in there."))
    cursor.execute(stmt, (111, "images/thLeBaou_021.jpg", "images/LeBaou_021.jpg", "Paula and pasta", "Here is Paula demonstrating how easy it is to make pasta."))
    cursor.execute(stmt, (112, "images/thLeBaou_022.jpg", "images/LeBaou_022.jpg", "Long, and circular", "Not quite a moebius strip, but here are Paul and Ali demonstrating Alex's cunning trick to stop you losing the end of your strip of pasta."))
    cursor.execute(stmt, (113, "images/thLeBaou_024.jpg", "images/LeBaou_024.jpg", "Lunch", "A typical lunch at Le Baou d'Infer. Its a tough week and you have to be pretty dedicated to survive it."))
    cursor.execute(stmt, (114, "images/thLeBaou_026.jpg", "images/LeBaou_026.jpg", "Rosie", "Rosie on the prowl. For a dog on a diet there are slim pickings."))
    cursor.execute(stmt, (115, "images/thLeBaou_029.jpg", "images/LeBaou_029.jpg", "Desert", "We made some lemon puddings. They were lovely and may well crop up on a desert plate near you soon. Note the use of the word may."))
    cursor.execute(stmt, (116, "images/thLeBaou_033.jpg", "images/LeBaou_033.jpg", "The happy couple", "I spent a week slaving in the kitchen, she snoozed - a lot. Who got the best deal then?"))
    cursor.execute(stmt, (117, "images/thLeBaou_037.jpg", "images/LeBaou_037.jpg", "Souffles", "We made some souffles, and they were delicious. I shall not be sharing the secrets of their fluffiness though, oh no."))
    cursor.execute(stmt, (118, "images/thLeBaou_039.jpg", "images/LeBaou_039.jpg", "Bulge", "Just to prove here excuse for lounging, and snoozing, here is Fiona at her finest. Nice pool missus."))
    cursor.execute(stmt, (119, "images/thLeBaou_042.jpg", "images/LeBaou_042.jpg", "Waiting", "Once the cooking is done, what is left to do but wait for meal time. Its a good thing that the waiting area was so hospitable"))
    cursor.execute(stmt, (120, "images/thLeBaou_055.jpg", "images/LeBaou_055.jpg", "Ali and Suzi", "Here are Ali and Suzi at the Auberge in La Mole, a very popular restuarant indeed. Especially with us."))
    cursor.execute(stmt, (121, "images/thLeBaou_056.jpg", "images/LeBaou_056.jpg", "Paula", "Paula at the Auberge."))
    cursor.execute(stmt, (122, "images/thLeBaou_062.jpg", "images/LeBaou_062.jpg", "St Tropez", "At repose in St Tropez. They let us out to play for a couple of hours on Saturday morning, but only to buy more food to cook."))
    cursor.execute(stmt, (123, "images/thLeBaou_068.jpg", "images/LeBaou_068.jpg", "A pass", "The end of the week, a certificate of achievement and the highly prized cooking apron."))
    # Start links
    stmt = """INSERT INTO links( link_id, section_id, to_page_id, to_url, to_url_title, to_photo_id, to_media_id, valid ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"""
    # Photos 1
    cursor.execute(stmt, (31, 122, "", "", "", 1, "", "Y"))
    cursor.execute(stmt, (32, 122, "", "", "", 2, "", "Y"))
    cursor.execute(stmt, (33, 122, "", "", "", 3, "", "Y"))
    cursor.execute(stmt, (34, 122, "", "", "", 4, "", "Y"))
    cursor.execute(stmt, (35, 122, "", "", "", 5, "", "Y"))
    cursor.execute(stmt, (36, 122, "", "", "", 6, "", "Y"))
    cursor.execute(stmt, (37, 122, "", "", "", 7, "", "Y"))
    cursor.execute(stmt, (38, 122, "", "", "", 8, "", "Y"))
    cursor.execute(stmt, (39, 122, "", "", "", 9, "", "Y"))
    cursor.execute(stmt, (40, 122, "", "", "", 10, "", "Y"))
    cursor.execute(stmt, (41, 122, "", "", "", 11, "", "Y"))
    cursor.execute(stmt, (42, 122, "", "", "", 12, "", "Y"))
    cursor.execute(stmt, (43, 122, "", "", "", 13, "", "Y"))
    cursor.execute(stmt, (44, 122, "", "", "", 14, "", "Y"))
    cursor.execute(stmt, (45, 122, "", "", "", 15, "", "Y"))
    cursor.execute(stmt, (46, 122, "", "", "", 16, "", "Y"))
    # Photos 2
    cursor.execute(stmt, (47, 124, "", "", "", 17, "", "Y"))
    cursor.execute(stmt, (48, 124, "", "", "", 18, "", "Y"))
    cursor.execute(stmt, (49, 124, "", "", "", 19, "", "Y"))
    cursor.execute(stmt, (50, 124, "", "", "", 20, "", "Y"))
    cursor.execute(stmt, (51, 124, "", "", "", 21, "", "Y"))
    cursor.execute(stmt, (52, 124, "", "", "", 22, "", "Y"))
    cursor.execute(stmt, (53, 124, "", "", "", 23, "", "Y"))
    cursor.execute(stmt, (54, 124, "", "", "", 24, "", "Y"))
    cursor.execute(stmt, (55, 124, "", "", "", 25, "", "Y"))
    cursor.execute(stmt, (56, 124, "", "", "", 26, "", "Y"))
    cursor.execute(stmt, (57, 124, "", "", "", 27, "", "Y"))
    cursor.execute(stmt, (58, 124, "", "", "", 28, "", "Y"))
    cursor.execute(stmt, (59, 124, "", "", "", 29, "", "Y"))
    cursor.execute(stmt, (60, 124, "", "", "", 30, "", "Y"))
    cursor.execute(stmt, (61, 124, "", "", "", 31, "", "Y"))
    cursor.execute(stmt, (62, 124, "", "", "", 32, "", "Y"))
    cursor.execute(stmt, (63, 124, "", "", "", 33, "", "Y"))
    cursor.execute(stmt, (64, 124, "", "", "", 34, "", "Y"))
    # Photos 4
    cursor.execute(stmt, (65, 128, "", "", "", 35, "", "Y"))
    cursor.execute(stmt, (66, 128, "", "", "", 36, "", "Y"))
    cursor.execute(stmt, (67, 128, "", "", "", 37, "", "Y"))
    cursor.execute(stmt, (68, 128, "", "", "", 38, "", "Y"))
    cursor.execute(stmt, (69, 128, "", "", "", 39, "", "Y"))
    # Photos 5
    cursor.execute(stmt, (70, 130, "", "", "", 40, "", "Y"))
    cursor.execute(stmt, (71, 130, "", "", "", 41, "", "Y"))
    cursor.execute(stmt, (72, 130, "", "", "", 42, "", "Y"))
    cursor.execute(stmt, (73, 130, "", "", "", 43, "", "Y"))
    cursor.execute(stmt, (74, 130, "", "", "", 44, "", "Y"))
    # Photos 6
    cursor.execute(stmt, (75, 132, "", "", "", 45, "", "Y"))
    cursor.execute(stmt, (76, 132, "", "", "", 46, "", "Y"))
    cursor.execute(stmt, (77, 132, "", "", "", 47, "", "Y"))
    cursor.execute(stmt, (78, 132, "", "", "", 48, "", "Y"))
    # Photos 7
    cursor.execute(stmt, (79, 134, "", "", "", 49, "", "Y"))
    cursor.execute(stmt, (80, 134, "", "", "", 50, "", "Y"))
    cursor.execute(stmt, (81, 134, "", "", "", 51, "", "Y"))
    cursor.execute(stmt, (82, 134, "", "", "", 52, "", "Y"))
    cursor.execute(stmt, (83, 134, "", "", "", 53, "", "Y"))
    # Photos 8
    cursor.execute(stmt, (84, 136, "", "", "", 54, "", "Y"))
    cursor.execute(stmt, (85, 136, "", "", "", 55, "", "Y"))
    cursor.execute(stmt, (86, 136, "", "", "", 56, "", "Y"))
    cursor.execute(stmt, (87, 136, "", "", "", 57, "", "Y"))
    cursor.execute(stmt, (88, 136, "", "", "", 58, "", "Y"))
    # Photos 9
    cursor.execute(stmt, (89, 138, "", "", "", 59, "", "Y"))
    cursor.execute(stmt, (90, 138, "", "", "", 60, "", "Y"))
    cursor.execute(stmt, (91, 138, "", "", "", 61, "", "Y"))
    cursor.execute(stmt, (92, 138, "", "", "", 62, "", "Y"))
    cursor.execute(stmt, (93, 138, "", "", "", 63, "", "Y"))
    cursor.execute(stmt, (94, 138, "", "", "", 64, "", "Y"))
    # Photos 10
    cursor.execute(stmt, (95, 140, "", "", "", 65, "", "Y"))
    cursor.execute(stmt, (96, 140, "", "", "", 66, "", "Y"))
    cursor.execute(stmt, (97, 140, "", "", "", 67, "", "Y"))
    cursor.execute(stmt, (98, 140, "", "", "", 68, "", "Y"))
    cursor.execute(stmt, (99, 140, "", "", "", 69, "", "Y"))
    cursor.execute(stmt, (100, 140, "", "", "", 70, "", "Y"))
    cursor.execute(stmt, (101, 140, "", "", "", 71, "", "Y"))
    cursor.execute(stmt, (102, 140, "", "", "", 72, "", "Y"))
    cursor.execute(stmt, (103, 140, "", "", "", 73, "", "Y"))
    cursor.execute(stmt, (104, 140, "", "", "", 74, "", "Y"))
    cursor.execute(stmt, (105, 140, "", "", "", 75, "", "Y"))
    cursor.execute(stmt, (106, 140, "", "", "", 76, "", "Y"))
    cursor.execute(stmt, (107, 140, "", "", "", 77, "", "Y"))
    cursor.execute(stmt, (108, 140, "", "", "", 78, "", "Y"))
    cursor.execute(stmt, (109, 140, "", "", "", 79, "", "Y"))
    cursor.execute(stmt, (110, 140, "", "", "", 80, "", "Y"))
    cursor.execute(stmt, (111, 140, "", "", "", 81, "", "Y"))
    cursor.execute(stmt, (112, 140, "", "", "", 82, "", "Y"))
    cursor.execute(stmt, (113, 140, "", "", "", 83, "", "Y"))
    cursor.execute(stmt, (114, 140, "", "", "", 84, "", "Y"))
    cursor.execute(stmt, (115, 140, "", "", "", 85, "", "Y"))
    cursor.execute(stmt, (116, 140, "", "", "", 86, "", "Y"))
    # Photos 11
    cursor.execute(stmt, (117, 142, "", "", "", 87, "", "Y"))
    cursor.execute(stmt, (118, 142, "", "", "", 88, "", "Y"))
    cursor.execute(stmt, (119, 142, "", "", "", 89, "", "Y"))
    cursor.execute(stmt, (120, 142, "", "", "", 90, "", "Y"))
    cursor.execute(stmt, (121, 142, "", "", "", 91, "", "Y"))
    cursor.execute(stmt, (122, 142, "", "", "", 92, "", "Y"))
    cursor.execute(stmt, (123, 142, "", "", "", 93, "", "Y"))
    cursor.execute(stmt, (124, 142, "", "", "", 94, "", "Y"))
    # Photos 12
    cursor.execute(stmt, (125, 144, "", "", "", 95, "", "Y"))
    cursor.execute(stmt, (126, 144, "", "", "", 96, "", "Y"))
    cursor.execute(stmt, (127, 144, "", "", "", 97, "", "Y"))
    cursor.execute(stmt, (128, 144, "", "", "", 98, "", "Y"))
    cursor.execute(stmt, (129, 144, "", "", "", 99, "", "Y"))
    cursor.execute(stmt, (130, 144, "", "", "", 100, "", "Y"))
    cursor.execute(stmt, (131, 144, "", "", "", 101, "", "Y"))
    cursor.execute(stmt, (132, 144, "", "", "", 102, "", "Y"))
    cursor.execute(stmt, (133, 144, "", "", "", 103, "", "Y"))
    # Photos 13
    cursor.execute(stmt, (134, 146, "", "", "", 104, "", "Y"))
    cursor.execute(stmt, (135, 146, "", "", "", 105, "", "Y"))
    cursor.execute(stmt, (136, 146, "", "", "", 106, "", "Y"))
    cursor.execute(stmt, (137, 146, "", "", "", 107, "", "Y"))
    cursor.execute(stmt, (138, 146, "", "", "", 108, "", "Y"))
    cursor.execute(stmt, (139, 146, "", "", "", 109, "", "Y"))
    cursor.execute(stmt, (140, 146, "", "", "", 110, "", "Y"))
    cursor.execute(stmt, (141, 146, "", "", "", 111, "", "Y"))
    cursor.execute(stmt, (142, 146, "", "", "", 112, "", "Y"))
    cursor.execute(stmt, (143, 146, "", "", "", 113, "", "Y"))
    cursor.execute(stmt, (144, 146, "", "", "", 114, "", "Y"))
    cursor.execute(stmt, (145, 146, "", "", "", 115, "", "Y"))
    cursor.execute(stmt, (146, 146, "", "", "", 116, "", "Y"))
    cursor.execute(stmt, (147, 146, "", "", "", 117, "", "Y"))
    cursor.execute(stmt, (148, 146, "", "", "", 118, "", "Y"))
    cursor.execute(stmt, (149, 146, "", "", "", 119, "", "Y"))
    cursor.execute(stmt, (150, 146, "", "", "", 120, "", "Y"))
    cursor.execute(stmt, (151, 146, "", "", "", 121, "", "Y"))
    cursor.execute(stmt, (152, 146, "", "", "", 122, "", "Y"))
    cursor.execute(stmt, (153, 146, "", "", "", 123, "", "Y"))

    # Media. Which is a list of books, cds and dvds I would quite like
    # Start media
    stmt = """INSERT INTO media( media_id, media_type, author, title, isbn, publisher, nice, valid ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? )"""
    cursor.execute(stmt, (1, "book", "Christopher Alexander et al", "A Pattern Language", "", "", "Y", "Y"))
    cursor.execute(stmt, (2, "book", "David Brin", "Sundiver", "", "", "", "Y"))
    cursor.execute(stmt, (3, "book", "Richard Calder", "Dead Girls, Dead Boys, Dead Things", "", "", "", "Y"))
    cursor.execute(stmt, (4, "book", "Tom DeMarco &amp; Timothy Lister", "<a href='http://www.dorsethouse.com/books/pw.html'>Peopleware</a>", "0-932633-43-9", "Dorset House, 1999", "Y", "Y"))
    cursor.execute(stmt, (5, "book", "Charles H Ferguson", "High Stakes, No Prisoners: A Winners Tale of Greed and Glory in the Internet Wars", "0812931432", "Times Books", "", "Y"))
    cursor.execute(stmt, (6, "book", "Alan Furst", "Kingdom of Shadows", "0375758267", "", "", "Y"))
    cursor.execute(stmt, (7, "book", "Richard P Gabriel", "Patterns of Software: Tales from the Software Community", "019510269X", "", "", "Y"))
    cursor.execute(stmt, (8, "book", "Adam Engst &amp; Glen Fleishman", "Wireless Networking for Windows and Macintosh", "0321174089", "", "Y", "Y"))
    cursor.execute(stmt, (9, "book", "<a href='http://joeclark.org/'>Joe Clark</a>", "<a href='http://joeclark.org/book/'>Building Accessible Websites</a>", "073571150X", "", "Y", "Y"))
    cursor.execute(stmt, (10, "book", "Witten, Moffat &amp; Bell", "<a href='http://www.cs.mu.oz.au/mg/'>Managing Gigabytes</a>", "1558605703", "", "", "Y"))
    cursor.execute(stmt, (11, "book", "Elizabeth David", "Elizabeth David Class: &quot;Mediterranean Food&quot; / &quot;French Country Cooking&quot; / &quot;Summer cooking&quot;", "1902304276", "Grub Street", "Y", "Y"))
    cursor.execute(stmt, (12, "book", "Elizabeth David", "An Omelette and a Glass of Wine", "", "", "", "Y"))
    cursor.execute(stmt, (13, "book", "Anne Tyler", "Dinner at the Homesick Restaurant", "", "", "Y", "Y"))
    cursor.execute(stmt, (14, "cd", "<a href='http://www.dodgy.co.uk/new.php'>Dodgy</a>", "Free Peace Sweet", "", "", "", "Y"))
    cursor.execute(stmt, (15, "cd", "<a href='http://www.lloydcole.com/'>Lloyd Cole</a>", "Lloyd Cole 2001 (ltd edition boxed set) contains Etc, Plastic Wood, Negatives, Live in New York", "", "", "", "Y"))
    cursor.execute(stmt, (16, "cd", "Lloyd Cole", "Muisc in a Foreign Language", "", "", "", "Y"))
    cursor.execute(stmt, (17, "cd", "Squeeze", "Frank", "", "", "", "Y"))
    cursor.execute(stmt, (18, "cd", "Squeeze", "Play", "", "", "", "Y"))
    cursor.execute(stmt, (19, "cd", "XTC", "Transistor Blast: Best of the BBC Sessions", "", "", "", "Y"))
    cursor.execute(stmt, (20, "cd", "XTC", "Oranges &amp; Lemons", "", "", "", "Y"))
    cursor.execute(stmt, (21, "cd", "XTC", "Skylarking", "", "", "", "Y"))
    cursor.execute(stmt, (22, "cd", "Various", "Our Friends Electric (Telstar TCD2814)", "", "", "Y", "Y"))
    cursor.execute(stmt, (23, "cd", "Prefab Sprout", "From Langley Park to Memphis", "", "", "", "Y"))
    cursor.execute(stmt, (24, "cd", "Teenage Fanclub", "Songs from Northern Britain", "", "", "", "Y"))
    cursor.execute(stmt, (25, "cd", "Moloko", "Statues", "", "", "", "Y"))
    cursor.execute(stmt, (26, "cd", "The Smiths", "The Smiths", "", "", "", "Y"))
    cursor.execute(stmt, (27, "cd", "<a href='http://www.boohewedine.net/disco/bible/bible_albums.htm'>The Bible</a>", "Eureka", "", "", "", "Y"))
    cursor.execute(stmt, (28, "cd", "<a href='http://www.boohewerdine.net/disco/bible/bible_albums.htm'>The Bible</a>", "Random Acts of Kindness", "", "", "", "Y"))
    cursor.execute(stmt, (29, "cd", "<a href='http://www.boohewerdine.net/disco/bible/bible_albums.htm'>The Bible</a>", "Dodo", "", "", "", "Y"))
    cursor.execute(stmt, (30, "cd", "<a href='http://www.boohewerdine.net/disco/boo/boo_albums.htm'>Boo Hewerdine</a>", "Anon", "", "", "", "Y"))
    cursor.execute(stmt, (31, "cd", "<a href='http://www.benfoldsfive.com/'>Ben Folds Five</a>", "Naked Baby Photos", "", "", "", "Y"))
    cursor.execute(stmt, (32, "cd", "Tears For Fears", "The Hurting", "", "", "", "Y"))
    cursor.execute(stmt, (33, "cd", "Tears For Fears", "Songs From The Big Chair", "", "", "", "Y"))
    cursor.execute(stmt, (34, "cd", "Tears For Fears", "The Seeds of Love", "", "", "", "Y"))
    cursor.execute(stmt, (35, "cd", "Hall &amp; Oates", "The Essential Collection", "", "", "", "Y"))
    cursor.execute(stmt, (36, "cd", "Beth Orton", "Trailer Park", "", "", "", "Y"))
    cursor.execute(stmt, (37, "cd", "Steely Dan", "Aja", "", "", "", "Y"))
    cursor.execute(stmt, (38, "cd", "Steely Dan", "Pretzel Logic", "", "", "", "Y"))
    cursor.execute(stmt, (39, "cd", "Steely Dan", "Katy Lied", "", "", "", "Y"))
    cursor.execute(stmt, (40, "book", "Alistair Reynolds", "Chasm City", "", "", "Y", "Y"))
    cursor.execute(stmt, (41, "book", "Martin Cruz Smith", "Gorky Park", "", "", "Y", "Y"))
    cursor.execute(stmt, (42, "book", "Richard Morgan", "Altered Carbon", "", "", "Y", "Y"))
    cursor.execute(stmt, (43, "book", "Robert Craig", "Cover to Cover", "", "", "Y", "Y"))
    # Start links
    stmt = """INSERT INTO links( link_id, section_id, to_page_id, to_url, to_url_title, to_photo_id, to_media_id, valid ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"""
    cursor.execute(stmt, (201, 61, "", "", "", "", 1, "Y"))
    # Books
    cursor.execute(stmt, (202, 61, "", "", "", "", 2, "Y"))
    cursor.execute(stmt, (203, 61, "", "", "", "", 3, "Y"))
    cursor.execute(stmt, (204, 61, "", "", "", "", 4, "Y"))
    cursor.execute(stmt, (205, 61, "", "", "", "", 5, "Y"))
    cursor.execute(stmt, (206, 61, "", "", "", "", 6, "Y"))
    cursor.execute(stmt, (207, 61, "", "", "", "", 7, "Y"))
    cursor.execute(stmt, (208, 61, "", "", "", "", 8, "Y"))
    cursor.execute(stmt, (209, 61, "", "", "", "", 9, "Y"))
    cursor.execute(stmt, (210, 61, "", "", "", "", 10, "Y"))
    cursor.execute(stmt, (211, 61, "", "", "", "", 11, "Y"))
    cursor.execute(stmt, (212, 61, "", "", "", "", 12, "Y"))
    cursor.execute(stmt, (213, 61, "", "", "", "", 13, "Y"))
    cursor.execute(stmt, (240, 61, "", "", "", "", 40, "Y"))
    cursor.execute(stmt, (241, 61, "", "", "", "", 41, "Y"))
    cursor.execute(stmt, (242, 61, "", "", "", "", 42, "Y"))
    cursor.execute(stmt, (243, 61, "", "", "", "", 43, "Y"))
    # Music
    cursor.execute(stmt, (214, 63, "", "", "", "", 14, "Y"))
    cursor.execute(stmt, (215, 63, "", "", "", "", 15, "Y"))
    cursor.execute(stmt, (216, 63, "", "", "", "", 16, "Y"))
    cursor.execute(stmt, (217, 63, "", "", "", "", 17, "Y"))
    cursor.execute(stmt, (218, 63, "", "", "", "", 18, "Y"))
    cursor.execute(stmt, (219, 63, "", "", "", "", 19, "Y"))
    cursor.execute(stmt, (220, 63, "", "", "", "", 20, "Y"))
    cursor.execute(stmt, (221, 63, "", "", "", "", 21, "Y"))
    cursor.execute(stmt, (222, 63, "", "", "", "", 22, "Y"))
    cursor.execute(stmt, (223, 63, "", "", "", "", 23, "Y"))
    cursor.execute(stmt, (224, 63, "", "", "", "", 24, "Y"))
    cursor.execute(stmt, (225, 63, "", "", "", "", 25, "Y"))
    cursor.execute(stmt, (226, 63, "", "", "", "", 26, "Y"))
    cursor.execute(stmt, (227, 63, "", "", "", "", 27, "Y"))
    cursor.execute(stmt, (228, 63, "", "", "", "", 28, "Y"))
    cursor.execute(stmt, (229, 63, "", "", "", "", 29, "Y"))
    cursor.execute(stmt, (230, 63, "", "", "", "", 30, "Y"))
    cursor.execute(stmt, (231, 63, "", "", "", "", 31, "Y"))
    cursor.execute(stmt, (232, 63, "", "", "", "", 32, "Y"))
    cursor.execute(stmt, (233, 63, "", "", "", "", 33, "Y"))
    cursor.execute(stmt, (234, 63, "", "", "", "", 34, "Y"))
    cursor.execute(stmt, (235, 63, "", "", "", "", 35, "Y"))
    cursor.execute(stmt, (236, 63, "", "", "", "", 36, "Y"))
    cursor.execute(stmt, (237, 63, "", "", "", "", 37, "Y"))
    cursor.execute(stmt, (238, 63, "", "", "", "", 38, "Y"))
    cursor.execute(stmt, (239, 63, "", "", "", "", 39, "Y"))
    # All done, commit away
    db.commit()

if __name__ == "__main__":
    myDb = openDb('andrew')
    populateTables(myDb)
