tags:

views:

75

answers:

2

The title says it all, is there a library or source code that's GPL that can turn a SQL statement into beautified HTML?

I'd even settle for some PHP or Java code that I can port to .NET

Tried google, but couldn't find any free sample code. Thanks.

A: 

Try SyntaxHighlighter.

That link is not working for me at the moment. Older version here.

RedFilter
+1  A: 

Beautified HTML, similar to how stack overflow highlights code? I've used SyntakHighlighter a lot to beautify my code on pages. It's javascript so it might not meet your requirements if you have to execute it server-side, but it's certainly one of the more popular ways.

If you can't run client-side then you could always follow their logic for highlighting SQL.

Parrots
This is great, but doesn't seem to unwrap the code.. very long statements are still very long statements. I was hoping it would wrap/indent the code too. This is very close to what I needed though, thank you
Jody Powlette
It does have a line-wrap option that will wrap at word breaks as needed. It won't split up long words or anything though.
Parrots