ok. Here is my 'Create Xerte Online Template' log file snippet:
2013-07-29 15:56:27 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : SELECT * FROM sitedetails
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : SELECT max(template_id) as count FROM templatedetails
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : select template_type_id, template_name, template_framework from originaltemplatesdetails where template_name = 'Nottingham'
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\templates\new_template.php46Running : INSERT INTO templatedetails (template_id, creator_id, template_type_id, date_created, date_modified, access_to_whom, template_name, extra_flags)
VALUES ('12', '4', '5', '2013-07-29', '2013-07-29', 'Private', 'chris_test_4', 'engine=javascript')
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\templates\new_template.php49Created new template entry in db
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\templates\new_template.php51Running : INSERT INTO templaterights (template_id, user_id, role, folder) VALUES ('12','4','creator','7')
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\templates\new_template.php54Setup template rights ok
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : SELECT template_framework from originaltemplatesdetails WHERE template_name = 'Nottingham'
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\modules\xerte\new_template.php91Creating new template : 12, Nottingham
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : SELECT * FROM sitedetails
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : SELECT * FROM sitedetails
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : select originaltemplatesdetails.template_name, logindetails.username, originaltemplatesdetails.template_framework, templaterights.user_id, templaterights.folder, templaterights.template_id, templatedetails.access_to_whom from originaltemplatesdetails, templaterights, templatedetails, logindetails where templatedetails.template_type_id = originaltemplatesdetails.template_type_id and templatedetails.creator_id = logindetails.login_id and templaterights.template_id = templatedetails.template_id and templaterights.template_id="12" and role="creator"
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : select * from templaterights where user_id='4' AND template_id = '12'
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\edit.php30Running : UPDATE templatedetails SET date_accessed='2013-07-29' WHERE template_id = '12'
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : select username from logindetails where login_id='4'
2013-07-29 15:56:28 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : SELECT * FROM sitedetails
2013-07-29 15:56:36 C:\Apache24\htdocs\...\moodle\xertetoolkits\website_code\php\database_library.php139Running : SELECT * FROM sitedetails