The Ballad of J G Thompson

{
  "store": {
    "books": [
      {
        "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95
      },
      {
        "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99
      },
      {
        "category": "fiction",
        "author": "Herman Melville",
        "title": "Moby Dick",
        "isbn": "0-553-21311-3",
        "price": 8.99
      },
      {
        "category": "fiction",
        "author": "J. R. R. Tolkien",
        "title": "The Lord of the Rings",
        "isbn": "0-395-19395-8",
        "price": 22.99
      }
    ],
    "bicycle": {
      "color": "red",
      "price": 19.95
    }
  }
}


store.book[0].category = "reference"
store.book[0].author = "Nigel Rees"
store.book[0].title = "Sayings of the Century"
store.book[0].price = 8.95

store.book[1].category = "fiction"
store.book[1].author = "Evelyn Waugh"
store.book[1].title = "Sword of Honour"
store.book[1].price = 12.99

store.book[2].category = "fiction"
store.book[2].author = "Herman Melville"
store.book[2].title = "Moby Dick"
store.book[2].isbn = "0-553-21311-3"
store.book[2].price = 8.99

store.book[3].category = "fiction"
store.book[3].author = "J. R. R. Tolkien"
store.book[3].title = "The Lord of the Rings"
store.book[3].isbn = "0-395-19395-8"
store.book[3].price = 22.99

store.bicycle.color = "red"
store.bicycle.price = 19.95






Events
----------------
id      time
================
14      10:34:19
15      10:35:01
16      10:35:02


Values
--------------------------------------------------
eventID k                    v           walkorder
==================================================
15      action               "submit"            0
15      formdata.username    "H. M. The King"    1
15      formdata.address[0]  "Buckingham Palace" 2
15      formdata.address[1]  "Pall Mall"         3
15      formdata.address[2]  "London"            4
15      formdata.postcode    "SW1A 1AA"          5





SELECT Events.time, Values.k, Values.v
FROM Events JOIN Values ON 
Events.ID = Values.EventID
WHERE k = ?
AND v = ?
AND time > ?
AND time < ?
ORDER BY Events.time, Values.walkorder

?1 = 'formdata.username'
?2 = 'J G Thompson'


No comments:

Post a Comment