Net worth

| | Comments (2)

Spent entirely too much time on the calls database this weekend. A lot of hacking perl and mysql was involved. Even managed to break the sql server in the process. It seems that if you do a select from multiple tables but don't put in the links properly, it generates rows over and over again. I don't know how many lines it was going to return, but it generated a 200mb temp file before the partition filled up. Later when I did a similar select on just a small fraction of the database, it returned over 2000 lines. Still haven't figured out the code properly, need to figure out how to do joins.

But I did get a bit of an admin interface working, where clicking on the categories prints out a summary of each entry. And I think I got a nifty date select working, that selects everything since the previous Sunday. Can anyone suggest anything better/more elegant/more compact than this:

select * from calls where date > DATE_SUB(DATE_FORMAT(now(), '%Y-%m-%d'), INTERVAL DAYOFWEEK(now()) day);

2 Comments

JC said:

Err...Um.... now I know what Brenda feels like when I start talking electrician.

September 3, 2003 8:39 AM

   

kazza said:

lol.. yeah.. :)

September 3, 2003 10:44 PM

   

Leave a comment

Welcome to my little piece of the Blogosphere!

I am a recent Canberra resident after having spent the first 34 years of my life in Sydney. I am married to my beautiful husband Stu, and we live with several computers and a lot of fish.

Kazza the Blank One home