SQLite Issue

Jim Ault JimAultWins at yahoo.com
Tue Dec 27 04:11:27 EST 2005


On 12/26/05 8:52 PM, "Scott Kane" <scott at proherp.com> wrote:

>  --> COLLECT name AND email
>   put "name,email" into tColumnItems
>   repeat for each item I in tColumnItems
>     --ask question "New value for column: " & I
>     put Field "edName" into i
>     --if it is empty or the result is "cancel" then exit to top
>     put "'" & cleanSQL(it) & "'" & "," after tRowData
>   end repeat

Why would you be using cleanSQL(it) when you have left out the line that
defines 'it'

I would suggest the following syntax for clarity.  I avoid using "I, l, 1,j,
n, m" because they look too much alike and too similar to other reserved
works such as  'it'   'item'
I prefer k as a loop variable, and use caps for the variable generated when
using "for each line LNN"  or  "for each item ITM"  or "word WRD"

 >  --> COLLECT name AND email
>   put "name,email" into tColumnItems
>   repeat for each item ITM in tColumnItems
>     --ask question "New value for column: " & ITM
>     put Field "edName" into ITM
>     --if it is empty or the result is "cancel" then exit to top
>     put "'" & cleanSQL(ITM) & "'" & "," after tRowData
>   end repeat

Jim Ault
Las Vegas





More information about the use-livecode mailing list