I want to limit access to username+password table to one query pattern like:
SELECT count(id) AS auth_result
FROM user
WHERE username = '%s'
AND password = SHA1('%s')
(this query doesn't pretend to be working from the point of injection vulnerability, just an example)
Is that possible? or am I missing some different approach?