Solved

CGI

Posted on 2004-08-04
4
221 Views
Last Modified: 2010-05-18
i want to be able to view certain data from the database and though of using CGI to display it.
can Perl CGI be used to extract data from database? (50 pts)
If so, can anyone show me? the steps perhaps (will add on pts)

thanks
0
Comment
Question by:TPoly
  • 2
4 Comments
 
LVL 20

Expert Comment

by:jmcg
ID: 11722910
Yes, it can. There are several experts here who will be glad to help you but for an example to be more useful to you, it would help to know some specifics:

what database product(s) are you using?

do you have a sample SQL statement that produces the data you want displayed?

In addition to the CGI module, you'll most likely end up with the DBI module and one of the DBD driver modules.

=============

Some databases have native web interfaces that work out-of-the-box for simple stuff and can be customized to do less simple stuff. Sometimes it's better to use Perl, sometimes it's better to embrace the product.
0
 

Author Comment

by:TPoly
ID: 11724029
ok thanks..

I'm using Mysql.

Sample SQL statement: select job from test where job = "abc";
Is this what you mean by sample SQL statement?

0
 
LVL 84

Expert Comment

by:ozo
ID: 11724056
0
 
LVL 20

Accepted Solution

by:
jmcg earned 50 total points
ID: 11725462
Here a couple of older questions that contain examples of retrieving data from a MySQL database and formatting the results as an HTML table. I'm not sure selecting from one column is going to get you an interesting table, but if you take a look at these examples, I'm sure you can adapt them to do what you want.

http:Q_20995819.html

http:Q_20873609.html

The experts who contributed those answers are still active here and you should be able to get answers to any further questions you have.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question