Create and Query Tables: Difference between revisions

From EUSwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
Wednesday,201811281030,201811281430,10:30AM,2:30PM,Sports,Lower West Field,500,Ranked,Yes,You play the sports here
Wednesday,201811281030,201811281430,10:30AM,2:30PM,Sports,Lower West Field,500,Ranked,Yes,You play the sports here
</data>
</data>
Preyansh, this might be way more complicated than you had in mind, so forgive me. It just has less room for human error, proooobably?
So in short here's what's going on. If the coords have a table that has the data laid out as below, where '''startnum''' and '''endnum''' are the YmdHi (concatenated timestamp sans seconds), we can insert that as comma separated syntax (see [[#The Data|the data]]) and then have it output in a table or other sort of fashion. This allows us to have all the event information accessible and reformattable from one location, as opposed to having to update say three locations at once.
I've not yet gone over with you what these alternative databases are.... In short, it's like mySQL but accessible to queries inside of the wiki. So when we input the information below, it creates and inserts information into a table called '''[[Table:E-Week 2019]]''' into the different fields we specify. Now that it's all neat and tidy in one place, you can query it (with some limitations...)
==The Input==
==The Input==
<pre>
<pre>
Line 25: Line 30:
<header>
<header>
{| class="wikitable"
{| class="wikitable"
! Event !! Location
! Event !! Location !!Time End
|-
|-
</header>
</header>
{{#ifexpr:{{{startnum}}}<201811271900
{{#ifexpr:{{{startnum}}}<201811271900
|{{Test3|1={{{Event}}}|2={{{Location}}}}}
|{{Test3|1={{{Event}}}|2={{{Location}}}|3={{#time:H:iA|{{{endnum}}} }} }}
}}
}}
<footer>
<footer>

Revision as of 00:50, 28 November 2018

Tuesday,201811271700,101811271830,5:00PM,6:30PM,Captain's Challenge,Blues Pub,0,N/A,No,The captain's go on a hunt for clues! Tuesday,201811271930,201811280230,7:30PM,2:30AM,Bus Trip to Nowhere,Nowhere,400,Ranked,No,TripleBogieNoDescription Wednesday,201811280900,201811281000,9:00AM,10:00AM,Breakfast,Common Room,150,Tiered,No,This is where you eat food, points for participation Wednesday,201811281030,201811281430,10:30AM,2:30PM,Sports,Lower West Field,500,Ranked,Yes,You play the sports here Preyansh, this might be way more complicated than you had in mind, so forgive me. It just has less room for human error, proooobably?

So in short here's what's going on. If the coords have a table that has the data laid out as below, where startnum and endnum are the YmdHi (concatenated timestamp sans seconds), we can insert that as comma separated syntax (see the data) and then have it output in a table or other sort of fashion. This allows us to have all the event information accessible and reformattable from one location, as opposed to having to update say three locations at once.

I've not yet gone over with you what these alternative databases are.... In short, it's like mySQL but accessible to queries inside of the wiki. So when we input the information below, it creates and inserts information into a table called Table:E-Week 2019 into the different fields we specify. Now that it's all neat and tidy in one place, you can query it (with some limitations...)

The Input

<data table="E-Week 2019" fields="Day,startnum,endnum,Start,End,Event,Location,Points,Type,Double,Description">

Tuesday,201811271700,101811271830,5:00PM,6:30PM,Captain's Challenge,[[Blues Pub]],0,N/A,No,The captain's go on a hunt for clues!
Tuesday,201811271930,201811280230,7:30PM,2:30AM,Bus Trip to Nowhere,Nowhere,400,Ranked,No,TripleBogieNoDescription
Wednesday,201811280900,201811281000,9:00AM,10:00AM,Breakfast,Common Room,150,Tiered,No,This is where you eat food,points for participation
Wednesday,201811281030,201811281430,10:30AM,2:30PM,Sports,Lower West Field,500,Ranked,Yes,You play the sports here

</data>

The Data

<repeat table="E-Week 2019"></repeat>

Output Examples

Table

Criteria
Start Time < 201811271900 (2018-11-27 19:00)

<repeat table="E-Week 2019"> <header>

</header> Expression error: Unrecognized punctuation character "{". <footer>
Event Location Time End

</footer> </repeat>

Other

Criteria
Start Time > 201811271900 (2018-11-27 19:00)

<repeat table="E-Week 2019">Expression error: Unrecognized punctuation character "{".</repeat>