Are there any query colorers out there? I can't seem to find any using Google, yet I've seen mysql queries colored before.
Any help?
Color a mysql query?
Moderator: General Moderators
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Umm. Theres a web-based one here: http://tripleasp.net/Services/ShowCode.asmx but your probably best just coding your own.
What!? Wasn't that a good challenge for you? 
I'll see what I have in the store, though i doubt saving this...
Another idea is to look at taglists/wordlists that alot of win32 software use to internally syntax highlight code (among others, SQL). Is there a get_defined_functions() for mysql? Never thought of it, but if so, youre halfways there...
Edit II:
Download the mysql source, and check out the /sql/lex.h file (functions) and /Docs/reservedwords.texi (reserved words) for a good start...
Edited:
I couldn't find the old work, so I whipped something easy together to get you started. Took some data from phpMyAdmin to help me get started...
> Demo and source example
For others reading: Yes, it's ugly. Yes, it can be done better, but... It more fun to do something by yourself isn't it?
I'll see what I have in the store, though i doubt saving this...
Another idea is to look at taglists/wordlists that alot of win32 software use to internally syntax highlight code (among others, SQL). Is there a get_defined_functions() for mysql? Never thought of it, but if so, youre halfways there...
Edit II:
Download the mysql source, and check out the /sql/lex.h file (functions) and /Docs/reservedwords.texi (reserved words) for a good start...
Edited:
I couldn't find the old work, so I whipped something easy together to get you started. Took some data from phpMyAdmin to help me get started...
> Demo and source example
For others reading: Yes, it's ugly. Yes, it can be done better, but... It more fun to do something by yourself isn't it?
