> Yea, for my purposes, I think an md5 of only the $sql would do. I would imagine prepending "query" AFTER the hash would make sense (at least then you could see what the key was for, rather than just a bunch of random numbers), like so:
$key = "query:" . md5($sql) Dean.
