Solved

Free Oracle SQL to HTML Beautifier?

Posted on 2011-03-04
2
462 Views
Last Modified: 2012-05-11
So I'm looking for some source code or something I can implement in php to take in a string of SQL and return a string with HTML tags so it'll appear nicely on a webpage.  Does anyone know of anything like this?

Currently I'm using: http://code.google.com/p/php-sqlformat/
but it's for mysql, not oracle.  I'd like something more oracle specific.  It does the job for most queries, but it has some weird indenting rules.
0
Comment
Question by:Doug Walton
2 Comments
 
LVL 9

Accepted Solution

by:
damerval earned 250 total points
ID: 35062335
It sounds like php-mysqlformat does more of a beautifying job than an actual html formatting job.
In order to stop the browser from interpreting any of your html markup as tags, place the code inside a
<CODE></CODE> tag. If you'd like to beautify your PL/SQL beforehand, use either the tools supplied with Oracle (I don't know which version you have) or a tool like this one:
http://psti.equinoxbase.com/

HTH

Philippe
0
 
LVL 4

Author Closing Comment

by:Doug Walton
ID: 35097675
Thanks, I didn't see that one when I was searching.  It's pretty nice, but I was looking for something I could implement on my site.  

For example, my program grabs the queries from a database and then displays which ones run most often.  Most of the time their pretty long queries and hard to read, so something that I could implement in my program (like a library or something) to format the sql query automatically would be awesome.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
The viewer will learn how to dynamically set the form action using jQuery.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now