ODBC Driver for Zoho Books

Build 22.0.8479

データのクエリ

接続 後、SQL ステートメントを実行して結果を取得できます。

SELECT プロシージャ

odbc_exec を使用してクエリを実行できます。これにより、結果を読むために使用できるリソースが返されます。

$stmt = odbc_exec($cnx, "SELECT InvoiceId, InvoiceNumber FROM INVOICES WHERE CustomerName = 'NewTech Industries'");

結果の反復処理

odbc_fetch_array を使用して次の行を配列としてフェッチできます。

while ($row = odbc_fetch_array($stmt)) {
    echo "InvoiceId = ", $row["InvoiceId"], "\n";
    echo "InvoiceNumber = ", $row["InvoiceNumber"], "\n";
}

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8479