MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

dynamically generated SQL queries



A propos of a recent question regarding Perl, & my extensive perusing 
of the email archive, I have concluded that the documentation asserts 
a functionality that simply does not exist.

Specifically, the docs say this:

***********
For any of these, you may pass arguments with the [arg]argument[/arg] 
quoting method, which substitutes the contained
value for successive values of %s in the query. For example:

     [sql html]
     [arg][value passed_title][/arg]
     [arg][value passed_artist][/arg]
         select code, title, title from products
             where artist = %s and title = %s
     [/sql]

  *************


I cannot make anything like this work. If the args are variables -- 
scratch tags or value tags -- the thing doesn't work.

Similarly, dynamically generated queries from Perl seem to be 
impossible, because Minivend evaluates all of the MV tags (e.g. [sql 
array][/sql]) before evaluating any of the Perl code.

If anyone has a reasonable scheme for generating SQL queries on the 
fly -- preferably in embedded Perl -- I would love to hear about it. 
Otherwise, I'm going to have to hack into the MiniVend source and 
make it work in accordance with its documentation. This will be 
expensive for me (fixed-price contract) and irritating to the client 
(because of the project delay).


Search for: Match: Format: Sort by: