sugoll (sugoll) wrote,

Point of views

<Database-y stuff>
The point of a VIEW is that, having created it, you can treat it like any "other" table, and not care that it is not, in fact, actually a table.

So why is it that bleedin' MySQL's date/time operations are returning different results for a query, wherein the only difference is whether it's on a view or a table, both of which are returning the same underlying data?

(alternatively, the type-promotion semantics of MySQL's SQL are even more capricious than--- well, than any language since K&R, really.)

I spent much of last weekend swearing at such things, before I realised the VIEW or otherwise was the deciding factor, and life got a lot simpler. A lot of progress has been made, since.

It's somewhat annoying to discover that, where this database is going to be deployed, the server version doesn't support views. Damnit. As I said to waveney, I can program around that. But it'll be a pain. Arse.
</Database-y stuff>

Still, it was exceedingly nice of altariel to offer to look at swords as a means of distracting me from the pain, last weekend. :-)
Tags: computers, mysql
  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.