updated book sql to alow for different views of detai depending on if editing or not.