TSW WebCoder 2010 sneak-peek part 5: Inline SQL highlighting
March 29, 2010
An area that has been much improved in WebCoder 2010, is the SQL support. In this post, I will show you the first step, which is syntax highlighting of SQL code inside your PHP files. Since SQL in PHP is really just text strings, this is a bit tricky to get right all the time, but I think that it's better to have it working 95% of the time than to miss out on a really cool feature. So without further ado, here it is:
In this color theme, the SQL colors are pretty similar to the PHP colors, but as you can see, the actual SQL keywords and function names are highlighted. Since WebCoder can now identify SQL in your code, it offers some cool possibilities, most of which we will look into in the next blog post, but here is one of them:
This function will execute the SQL statement against your currently active database connection. If you have inline PHP variables, WebCoder will try to detect them and then prompt you for their value, allowing you to test your SQL queries in various situations. In the next post, I will show you something even more awesome from the SQL world of WebCoder 2010. Stay tuned and let me know what you think :)