f00li5h is
16 years ago
writing more rip-stuff-from-html-and-stuff-it-in-a-database code
latest #21
f00li5h
16 years ago
"all our customers are on the webserver" "how do you know if people on there are paid up or not" "we don't"
f00li5h
16 years ago
creates `table customers (id,is_freeloader int(1), customer_name text); web_hosting(domain_name text, custoemr_id)`
SubStack wonders
16 years ago
why is_freeloaders isn't a boolean
立即下載
pkrumins
16 years ago
hrm kit
SubStack hates
16 years ago
mysql digit constraints
f00li5h
16 years ago
pesky SQLs
@Kent
16 years ago
sql: the only language where boolean has 3 valid values. 0, 1, null.
Hlagh
16 years ago
I once broke a stored procedure because I used IF column <> "foo"
Hlagh
16 years ago
but column <> "foo" is false if column is NULL
f00li5h
16 years ago
notes that neighter `null > 1` nor `null < 1`
Hlagh
16 years ago
of course good database design suggests avoiding nullable columns like the plague
f00li5h
16 years ago
suggests that there are some times when you just don't know the answer
f00li5h
16 years ago
notes that his case is extracting information from html, and then sticking into a row... but there is not enough info full the whole row
SubStack
16 years ago
paws at sparse data structures
f00li5h
16 years ago
shakes the pesky html until the information falls out
Altreus
16 years ago
points out that boolean in SQL is usually int(1) anyway.
f00li5h is
16 years ago
confused by langauges that care about types
SubStack likes
16 years ago
hindley-milner type inference
SubStack thinks
16 years ago
c and sql do types poorly in comparison
back to top