Hello, new user here.
I am working on a timesheet manager program. Users can log in and fill out their time report for the day. Managers can log in and build custom reports. All of that works wonderfully. My code builds the sql statements correctly, I get the correct reports.
A feature I would like to add is to allow the managers to save their commonly used reports. I created a table in postgres with the fields:
id serial
title varchar(32)
description text
query text (this is where the statement should store)
When I try to store the sql statement, I get syntax errors. I somewhat expected this. I figured that it was because I was including a sql statement inside of a sql insert statement. Do I need to somehow get rid of the single quotes?
Long story made longer. What would be the best course of action for saving sql statements?
Thanks in advance,
I didnt post any code because I dont think that it is an issue with my code. Just how I am trying to store it.