Forum Moderators: coopster

Message Too Old, No Replies

Is there an SQL Formatter/Beautifier?

         

BlackDex

11:32 am on Nov 30, 2007 (gmt 0)

10+ Year Member



Hello there an code/script/module to Beautify (My)SQL?
So it wil add new-lines and space/tabs to a one-lined query?

I Have tryed google, and didn't find anything that can do this.
Mabye i have overlooked something.

Thx in advanced.

whoisgregg

5:36 pm on Nov 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know that phpMyAdmin [phpmyadmin.net] will redisplay SQL code with line breaks, tabs, and coloring added. It's an open source project, so you could always just peek into their code and see how they do it.

BlackDex

6:19 pm on Nov 30, 2007 (gmt 0)

10+ Year Member



Well i tryed that.
And to be blunt, its kinda crappy code.
It isn't very dynamic, and hoped that there was something else then phpMyAdmin.

phranque

7:23 pm on Nov 30, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



did you try searching for "beautify sql code" or "sql code beautifier"?

Stevec4

1:09 pm on Dec 5, 2007 (gmt 0)

10+ Year Member



[dev.mysql.com...]

Check out the query browser here