One result would be:

sql=SELECT field1, field2 FROM table WHERE tag1=this AND tag2 LIKE that

so there are 4 fields in 1 table resulting field1 and field2 with 
parameters tag1 and tag2

This is just an example to get the gist of it. You would have to format 
the ',' to show up and at the right times and the 'AND' or 'OR' 
statements to show up when appropriate and ' ' where needed.

I can send you a working one if you need a working example - but it's 
messy and longggggggg - but it's dynamic!

I use Danny's example type in most cases but it's not as dynamic in 
cases where the resulting query could be a seemingly infinite number of 
choices - There is more code and variables to define.

I have only actually deployed this case scenario in one application.

Matt.

-----Original Message-----
From: Ray Noel <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Fri, 13 Sep 2002 12:54:35 +0800
Subject: [sambar] Database scripting. {08}

> OK..
> 
> >Well there are two methods to make a SQL statement:
> >
> >1. Have all the statements hard coded as you mentioned
> >2. Pass the script in hyperlink form mode to another page which
> actually
> >executed the statement:
> >[Page 1 - The gathering page]
> >[Page 2 - the parsing page]
> ><META HTTP-EQUIV="Refresh" Content="0; URL=
> >www.me.com/page3.stm?sql=SELECT
> ><RCif RC$var1 ! NULL AND RC$var1 = this>
> >field1,
> ><RC$endif>
> ><RCif RC$var# ! NULL AND RC$var# = that>
> >field2,
> ><RCendif>
> >from
> ><RC$table>
> >where
> ><RCif RC$var1 ! NULL AND RC$var1 = this>
> >tag1 = <RC$var1>
> ><RCendif>
> ><RCif RC$var1 ! NULL AND RC$var# ! NULL>
> >AND
> ><RCendif>
> ><RCif RC$var1 ! NULL AND RC$var1 < this>
> >tag2 LIKE <RC$var#>
> > >
> 
> OK, I understand so far Matt, now we come to the hard bit.  How is it 
> executed with the RCQ tag without a syntax error or a SQL error?
> 
> Cheers
> Ray
> -------------------------------------------------------
> To unsubscribe please go to http://www.sambar.ch/list/
-------------------------------------------------------
To unsubscribe please go to http://www.sambar.ch/list/



Reply via email to