Jump to content
Larry Ullman's Book Forums

Writing Report Writer-General Advice


Recommended Posts

I am proficient in mysql database queries. I would like to write a "report writer" that allows users (not programmers) on a particular site to connect to a particular mysql database, select from drop-down menus populated by columns/rows in the database (e.g. student name or sports team) and have a report generated on the web site and available as a PDF printout. I am confused as to where to start....PHP, PHP PDO, JavaScript, JQuery....? I get started and solve one aspect of the challenge but don't seem able to put together a complete plan.  Can someone please advise me how to start( re-start).

Link to comment
Share on other sites

David, hello and welcome to the forums.

 

I'm a little unclear on what you're asking. Are you saying that you want to present drop-down menus to users that contain a list of all the columns in a DB table and all the rows in a DB table?

It seems that as the DB table gets really big, the drop-down menus would also get really big. Are you sure you want that?

 

Also, to generate a PDF printout, you need to use some third-party software. A web search for "PHP HTML to PDF" should give you what you're looking for.

Link to comment
Share on other sites

thanks for responding. Basically I'm trying to provide drop down menus to allow the user to select the "WHERE" part of the SQL query.  The database might have 35 student names in it; they might be on any of four sports teams; they each may have taken 50 quizzes on books that they have read with quiz name, quiz scores and date taken in the table.  Obviously there are multiple tables involved but I have figured out the joins necessary for the report. I would like to have a drop down list of the students names combined with a start date selector and an end date selector that would allow a supervisor to select the name and dates and see the quizes taken and the scores. OR select the team combined with a date selectors and see the students on that team listed with the quiz results. So the drop downs would have only 35 names on it. I assume with HTML and CSS I can put them in columns and allow scrolling if necessary.  I'm OK with letting the PDF go.

Also, I'm willing to do the heavy lifting here but I don't seem to be able to settle on the best language(s) to learn. My idea is to design the process for this application  so I can use the "template" for other MYSQL databases.

Link to comment
Share on other sites

It sounds to me like you want to create a graphical API for grabbing data from your DB.

 

If you want to grab data based on a name, I'd simply grab all the student names from the DB table and list them in either a drop-down menu or a table.

You could list start and end dates as well. The format you use for the dates is up to you (e.g., free entry with a text area, the new HTML5 date selectors, etc.).

 

Likewise, you could pull all the sports team from the DB table and list them however you list the student names above.

Without knowing more about the exact structure and size of the data though, it's hard to comment more concretely.

I would say, if there are only 35 students, then I'd just list them all in a table to start with, and when one is clicked on, display the info about that one student.

 

As for the language to use, really, you can use any back-end language that suits your fancy. This being Larry's forums and all, I imagine everyone here (including myself) would recommend using PHP.

 

I apologize if I didn't answer your question well, but I'm still having trouble understanding exactly what you want.

Please comment further if I didn't explain things well.

Thanks.

Link to comment
Share on other sites

Actually you did answer my question. This being a small database I am not overly concerned with performance. In addition I am most interested in function rather than form. So much advice I seem to find focuses on performance and form. I'd rather find the elegant solution than the pretty one. I'll start with a simple PHP program per your advice and build from there. I'll probably be back for specific advice as I move forward.  Thanks

Link to comment
Share on other sites

 Share

×
×
  • Create New...