Welcome to WebmasterWorld Guest from 54.196.244.186

Forum Moderators: open

Message Too Old, No Replies

Colour Code MySQL Statements

     
1:05 pm on Jan 7, 2011 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
posts:4842
votes: 1


I would like to colour code MySQL statements for displaying on a webpage, I think using colours helps with looking at the syntax.

Does anyone know of a tool that does this? PHP has something similar with the PHP -s flag that outputs code with coloured <font> tags.
3:23 pm on Jan 7, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 15, 2003
posts:2606
votes: 0


I have seen quite a few tools that will format sql statements. Adding line break and indentations for readablility.

It is likely that at least one of them would offer a colour option.

They usually come under the name SQL tidy or similar.
3:26 pm on Jan 7, 2011 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
posts:4842
votes: 1


Excellent, I see an online tool that'll do the job for me. Thanks.