I'm doing a test project using xotcl-note as a basis and was wanting to put my sql in an xql file but this doesn't seem to work as the xql is not found. Embedding the sql everything works;
Works;
CrQuote ad_instproc getOneQuote {
{-quotename:required}
{-quoteauthor:required}
} {
Get a random quote from the database
} {
upvar 1 $quotename name
upvar 1 $quoteauthor quote_author
db_1row get_random_quote "select quote_author, name from xotcl_cr_ea_quotesx order by random() limit 1 "
return
}
but changing
db_1row get_random_quote "select quote_author, name from xotcl_cr_ea_quotesx order by random() limit 1 "
to
db_1row get_random_quote {}
with the following xql
<?xml version="1.0"?>
<queryset>
<fullquery name="get_random_quote">
<querytext>
select quote_author, name
from xotcl_cr_ea_quotesx
order by random limit 1
</querytext>
</fullquery>
</queryset>
fails with statement not found.
Does ad_instproc interfere with the xql mechanism?
cheers
Matthew