cSQLQuery:= "SELECT id_grupo,descripcion FROM cat_grupos"
aGrupos:= oMySQLMain:QueryArray(cSQLQuery)
WITH OBJECT ::oCbxGrupos
:aItems:= ArrayCol( aGrupos, 1, 2 )
END WITH
/*-----------------------------------------------------------------------------------------------*/
FUNCTION ArrayCol( aData, nCol, nCol2 )
/*-----------------------------------------------------------------------------------------------*/
LOCAL aCol := Array( Len( aData ) )
IF nCol == NIL
nCol:= 1
ENDIF
IF nCol2!=NIL
Aeval( aData, {|v,e| aCol[ e ] := +"<"+AllTrim(v[ nCol ])+"> "+AllTrim(aData[ e,nCol2 ]) } )
ELSE
Aeval( aData, {|v,e| aCol[ e ] := AllTrim(v[ nCol ]) } )
ENDIF
RETURN aCol
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot], jpcavagnaro and 39 guests