<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I’ve looked at the sql output in the past and haven’t been able to use much of the data, parts of it such as maps seem to be undocumented.<div>Your request has caused me to look again. I’m not sure you’ll be able to do the things you want.</div><div><br></div><div>I have a cave system (Whiterock in Mulu) which has 123 surveys listed in the database. Each survey has a unique id and a name apart from the first record which has an id of 1 and no name. All the surveys have a parent id of 1 apart from the first record which has a parent id of 0.</div><div><br></div><div>If I look at the maps table there are 120 records and all are referenced to survey id 1 which is obviously the top level survey so I can’t identify which survey each map belongs to. I’ve tried creating a container survey to contain all the sub surveys but, when I do, all maps are referenced to that container survey</div><div><br></div><div>Similarly, if I look at the scraps table, all the scraps are referenced to the master survey.</div><div><br></div><div>My index file has a map for plans and a map for elevations. Each of the maps contains all the scraps for that elevation.</div><div>In addition all surveys have their own plan and elevation maps so that I can print out each survey map separately.</div><div><br></div><div>I then created a master map which contained each of the individual survey maps but all the individual maps are still referenced to the master survey.</div><div><br></div><div>What I’ve not tried to do is create a sql output for each survey. I’m sure that wouldn’t work anyway as the sql creates new tables and doesn’t append records. This means you would have to create a separate database for each survey and there would be no easy way of linking them.</div><div><br></div><div>I have done some work on Andrews code and when I’m satisfied with the results I’ll post on the Wiki.</div><div><br><div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Dave Clucas<br><a href="http://daveclucas.com" style="font-family: Helvetica; font-style: normal; font-weight: normal;">daveclucas.com</a><br><a href="http://sarawak-caves.com" style="font-family: Helvetica; font-style: normal; font-weight: normal;">sarawak-caves.com</a><br><a href="mailto:daveclucas@icloud.com" style="font-family: Helvetica; font-style: normal; font-weight: normal;">dave.clucas@icloud.com</a><br><br><span style="font-size: 14px;"><b>Exploring the World</b></span><span style="font-family: Helvetica; font-style: normal; font-weight: normal;"> - One cave at a time<br><br></span></div></div></div></div>
</div>
<br></div></body></html>