0

I have a table structured like so:

10 columns named report1 -> report10, a childName column, and parentId column. I need to upload a url to one of the report columns dynamically. So when I hit the upload on my front end, it sends a request to the backend, which I need to say, return data from table where the childName = the passed childName. Easy enough, I have this:

var viewStudents = "select * from reportsfor where CHILDNAME = '" + studentName + "'";

but where my issue lies, is the fact that I need to now figure out DYNAMICALLY if report1 is filled already, if report2 is ready, so on. I don't think I can do this from after I query the db this way, so i assume i need another query, or is there a way i can alter the query to do so?

Hopefully this makes sense!

Gianluca
  • 900
  • 8
  • 27

0 Answers0