It was a bit of a trick to find the DateInterval spec hidden away in the constructor doco, not the DateInterval class doco.
Designator | Description |
---|---|
Y | years |
M | months |
D | days |
W | weeks |
H | hours |
M | minutes |
S | seconds |
It was a bit of a trick to find the DateInterval spec hidden away in the constructor doco, not the DateInterval class doco.
Designator | Description |
---|---|
Y | years |
M | months |
D | days |
W | weeks |
H | hours |
M | minutes |
S | seconds |
Today I learned about LIMIT and OFFSET in PostgreSQL, which differs slightly from its MySQL cousin.
I’m always forgetting the syntax for the jQuery ‘document ready’ event. Which is an embarrassment because it’s so simple:
$( document ).ready( handler ) $().ready( handler ) (this is not recommended) $( handler )
I used to use the $( document ).ready( handler ) syntax, but starting today I use the $( handler ) syntax.
Today I used the Datepicker for Bootstrap. I grabbed the files from the CDN.
I wanted to know what the analogue for MySQL ‘show tables’ was in PostgreSQL, and I found the answer, use the information_schema, here:
mysql: SHOW TABLES postgresql: \d postgresql: SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'; mysql: SHOW DATABASES postgresql: \l postgresql: SELECT datname FROM pg_database; mysql: SHOW COLUMNS postgresql: \d table postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table'; mysql: DESCRIBE TABLE postgresql: \d+ table postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table';