SQL for GET and POST requests on href