Getting a web page based on database | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Getting a web page based on database

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-18-2013
rohit mishra rohit mishra is offline
Registered User
 
Join Date: Dec 2013
Last Activity: 18 December 2013, 1:00 AM EST
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Getting a web page based on database

I need to connect to a database, run a select query and get the o/p on a web page. please let me know how to do this via shell script.
Sponsored Links
    #2  
Old 12-24-2013
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 16 September 2014, 1:48 PM EDT
Location: Southern NJ, USA (Nord)
Posts: 4,412
Thanks: 8
Thanked 540 Times in 518 Posts
Simplest is to select with a command line tool, and deliver it as Content-Type: text/plain

Nest step up is to postprocess it with sed ( '&' = '&amp;' , '>' = '&gt;' , etc.) and embed into <PRE>...</PRE> in your HTML page.

Next step up is to postprocess it into an html table <TABLE><TR><TD>cell a1<TD>cell a2...</TABLE>.

I often add a leading marker column to help the postprocess find the header and cells: SELECT 'dAtA' as "dAtA", ....

Beyond that, there is PHP that runs queries to build the web page, and the whole gamut of web generation tools for ODBC, JDBC and proprietary to each RDBMS.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Java web console Vs Web-Based Enterprise Management(WBEM) cyberidude Solaris 0 11-07-2012 05:34 AM
Get a web page through CLI Pouchie1 UNIX Desktop for Dummies Questions & Answers 3 07-12-2009 05:48 PM
how do i make a web page Neil Peart UNIX for Dummies Questions & Answers 3 10-13-2005 11:04 AM
Accessing Web Page Imtiaz UNIX for Dummies Questions & Answers 3 06-08-2005 08:53 AM
Web page hosting PCL UNIX for Dummies Questions & Answers 1 03-18-2002 12:19 PM



All times are GMT -4. The time now is 11:30 AM.