Brutally Roll Your Own Backend – Part 6

3 Responses

  1. Do we loose multiple filter criteria by the refactoring at around 52:20?

    • I should really have explained that more clearly.
      You can still use multiple filters, it’s just that they’re all named ‘filter’ (rather than filter0, filter1..etc).
      The HTTP protocol does not prevent duplicate names on GET/POST variables, so you can add as many as you wish with the name of ‘filter’.

    • Well there is egg on my face today. While recording a much later part (18 or 19), for the first time our code must use multiple filters and you are right, they are broken. I was not entirely wrong. The HTTP protocol does not inhibit duplicate names, and php will let you access the data. However, when php parses those variables into a key=>value array, it appears that it does insist on unique keys. Corrected in the latest code.

Leave a Reply