calling a SQL method without arguments
If I have an SQL method with one optional argument, how can I call it without using that argument: For example: SQL_method Arguments: authorid select * from authors <!--#sqlgroup where--> <!--#sqltest authorid column=authorid type=int optional--> <!--#/sqlgroup--> Theoretically, if I call this with a authorid, it'll return the proper row, and if I don't, it'll return all rows. But, given the following: <!--#in SQL_method--> blah <!--#/in--> I get this error: <!-- Error type: Bad Request Error value: ['authorid'] --> So, what's the proper way to call a SQL method without arguments?
This SQL method takes two arguments "types" and "orderby". In the calling form I allow the arguments to be initialized with "" to indicate no selection. SELECT * FROM Technologies <!--#if types--> WHERE type IN (<!--#var types-->) <<<< Work in progress, (one value) <!--#/if--> <!--#if orderby--> ORDER BY <!--#sqlvar orderby type=int-->, 1 <!--#else--> ORDER BY 1 <!--#/if--> Larry
participants (2)
-
Daniel M. Drucker -
Larry Luther