Solved

Free Oracle SQL to HTML Beautifier?

Posted on 2011-03-04
2
473 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
Philippe 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 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