| Previous · Next | |
| User | Message |
|
elnino
|
Date: 12/7/2006 5:32 pm · Subject: SQL macro doesn't work? · Rating: 16
I don't know if it's the example I'm using (it looks right based on the help and db schema), or if the SQL macro doesn't work... I've created an article, and put the following in the description. ^SQL("select count(*) from users","There are ^0; users on this system."); But it simply prints out as such, and it doesn't run the macro. I'm able to run other macros and can create macros. So either Im missing somethign, or SQL doesn't work. I'm running 7.2.1. Thanks! LN --- (Edited on 12/ 7/2006 5:32 pm [GMT-0600] by elnino) --- |
| Back to Top |
Rate [ | ]
|
|
isaac
|
Date: 12/7/2006 5:41 pm · Subject: Re: SQL macro doesn't work? · Rating: 8
Have you enabled the macro in the config? The SQL macro is not enabled by default. You need this line in the config: "SQL" : "SQL" , In the macro area. --- (Edited on 12/ 7/2006 5:41 pm [GMT-0600] by isaac) --- |
| Back to Top |
Rate [ | ]
|
|
elnino
|
Date: 12/7/2006 5:53 pm · Subject: Re: SQL macro doesn't work? · Rating: 4
yeah... I JUST thought of that. You beat me to it. That was the problem. Thank you!--- (Edited on 12/ 7/2006 5:53 pm [GMT-0600] by elnino) --- |
| Back to Top |
Rate [ | ]
|
|
nikkimercier
|
Date: 12/10/2006 3:00 am · Subject: Re: SQL macro doesn't work? · Rating: 4
but how do you select to use database for which you have created a link with ^SQL. I'm trying to enumerate a list of options from SQL using select Country from Data GROUP BY Country to get a unique list to return to the system but I can't seem to get it to look elsewhere other than the WG DB! :< --- (Edited on 12/10/2006 3:00 am [GMT-0600] by nikkimercier) --- |
| Back to Top |
Rate [ | ]
|
|
colink
|
Date: 12/10/2006 4:09 pm · Subject: Re: SQL macro doesn't work? · Rating: 3
by default, it only uses the WebGUI database. If you check in the contribs section, you'll see a macro which extends the SQL macro to also do other databases.--- (Edited on 12/10/2006 4:09 pm [GMT-0600] by colink) --- |
| Back to Top |
Rate [ | ]
|