Solved

Free Oracle SQL to HTML Beautifier?

Posted on 2011-03-04
2
464 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

867 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

21 Experts available now in Live!

Get 1:1 Help Now