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.

(no subject)

Date: 2007-11-27 06:58 pm (UTC)
tshuma: (Default)
From: [personal profile] tshuma
I'm spending hours and hours combing through the code doing this very thing. We're restructuring our database, and I can't tell you how much hacky, sloppy code there is out there that means chaos ensues if we miss one.

February 2022

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

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 21st, 2025 04:55 am
Powered by Dreamwidth Studios