Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

New Feature Idea

I was writing some CityScript last night, and kept getting frustrated by its limitations (not that I'm complaining, mind you - it's better than any alternatives I've tried!). What I really wanted to be able to do was select the articles for a loop using SQL (it's just a database on the backend, after all).

Wouldn't it be a great feature if you could define some stored SQL queries that can be referenced from CityScript? They could be editied in a window similar to the current Variable editor.

So, I could create a query that returns all the articles that contain the term 'digital camera' in the body. Or all articles that contain links to www.fogcreek.com in any field.

Then you could create CityScript that looks something like:

{$ foreach x in (SQL.referencesFogCreek) $}
... loop body ...
{$ next $}

Or alternatively, the SQL query could actually print its output so that you just have to insert something like:

{$ sql .containsDigitalCamera $}

This would allow you to create queries that do more complex things like create a list of links to all articles posted in the last month, ordered by date descending, grouped under titles by Author.

Darren Collins
Thursday, October 24, 2002

Just simple variable/macro expansion will do I guess. Usable for more than just SQL queries. This way we wouldn't have to split procedures etc. in a start/end tag (like {$.H1$} and {$.EndH1$} for heading tags)

Even simple substitution would help us.
Like
{$foreach x in (news) $}
{$.heading(x)$}
{$next$}
the macro heading would be able to format all necessary fields, in every index in the same way.

Adriaan van den Brand
Friday, October 25, 2002

Yeah, I'd like to be able to use macros (sort of like passing parameters to Variables), but that's a different concept from what I was talking about above. I would like to be able to use SQL queries to work directly with the CityDesk database, so that I could do more complex things that CityScript simply can't do.

Darren Collins
Sunday, October 27, 2002

*  Recent Topics

*  Fog Creek Home