Jump to content

query and _arrayAdd


Recommended Posts

hi,

can i add my elaborated query result in to array?

and can i count total records in the query result?

$q.execute( "select COUNTRY_NAME from countries WHERE COUNTRY_ID='UK'", $conn )

While not $q.EOF

    MsgBox(0, "Result", "COUNTRY = " & $adors.Fields("COUNTRY_NAME") .Value)

; elaborate the result
; add to array

    $q.MoveNext
WEnd
$conn.close

_arrayDisplay()

than you

Link to comment
Share on other sites

hi,

can i add my elaborated query result in to array?

and can i count total records in the query result?

$q.execute( "select COUNTRY_NAME from countries WHERE COUNTRY_ID='UK'", $conn )

While not $q.EOF

    MsgBox(0, "Result", "COUNTRY = " & $adors.Fields("COUNTRY_NAME") .Value)

; elaborate the result
; add to array

    $q.MoveNext
WEnd
$conn.close

_arrayDisplay()

than you

can i add my elaborated query result in to array?

you need to create a recordset:

$Rec = ObjCreate("ADODB.Recordset");

$SQL = "select COUNTRY_NAME from countries WHERE COUNTRY_ID='UK'"

$Rec.Open( $SQL, $conn );

$myNew2DimensionalArray = $Rec.GetRows()

and can i count total records in the query result?

$recCount =$Rec.RecordCount

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...