revDataFromQuery with variable list question

Terence Heaford t.heaford at btinternet.com
Sat Mar 15 03:50:07 EDT 2014


I normally do my Sqlite queries like this, I think examples speak a thousand words.:

   put merge("select date,type,description,amount,balance,category,recID from '[[the uAcctName of this stack]]' order by date asc") into tSQL
   put revDataFromQuery(tab, return, the uDB of this stack, tSQL) into tData

or 

   put "select categoryName from 'categoryList' order by categoryName asc" into tSQL
   put revDataFromQuery(tab, return, the uDB of stack  “myStack", tSQL) into tCatNames

or

   put merge("SELECT date,type,description,amount,balance,category,recID from '[[the uAcctName of this stack]]' where date >= [[tStartDate]] and date <= [[tEndDate]] [[tCatStatement]] order by date asc") into tSQL
   put revDataFromQuery(tab, return, the uDB of this stack, tSQL) into tData

or

put merge("type like '%[[tType]]%'") into tTypeQuery

put merge("[[tQuery]] [[tCatQuery]] [[tAmountQuery]] [[tDescQuery]] [[tTypeQuery]] order by date asc") into tSQL


Is mTextContent a variable?


All the best

Terry



On 15 Mar 2014, at 05:44, Stephen MacLean <smaclean at madmansoft.com> wrote:

> Hi All,
> 
> I'm having a problem with this:
> 
> put "SELECT mFromGUID from messages WHERE (mTextContent LIKE '%:1%')"  into gMsgListQuery
> 
> put revDataFromQuery(,comma, gDatabaseID, gMsgListQUERY,"tFld") into tSearchResult
> 
> puts nothing into tSearchResult and the result is empty.
> 
> Do I have escape something differently? Or just missing something?
> 
> TIA,
> 
> Steve MacLean
> 
> 
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list