nonethefewer: (triumphant)
[personal profile] nonethefewer
I'm slowly making changes to both our website's backend database and the SQL statements that the site uses.  For lo, I'm tired of it always being shitty, but the chances of me having a week to make sweeping changes are exceedingly low.

Today, I changed a query in the PHP:

From: INSERT INTO table VALUES ('name', 'email', null, null, 0)
To: INSERT INTO table (colName, colEmail, colUses) VALUES ('name', 'email', 0)

Why?

- Knowing where values are going is good.  Lord knows we don't comment anything around here.
- Makes it way easier to add or remove a column.
- Why waste time always inserting null values?
- It's good SQL practices, goddammit.

If this gets changed, then the part of me that's always annoyed by our site will be less annoyed.  And that will be Good.


In case you ever wondered what pleases me, this is an example.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

February 2022

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728     

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 22nd, 2025 02:55 am
Powered by Dreamwidth Studios