Solved

Free Oracle SQL to HTML Beautifier?

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

828 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