ODBC Driver for Twitter

Build 22.0.8479

データの変更

次のコード例は、データ変更ステートメントの使い方を示します。

更新手順

odbc_exec を使用して、データ変更ステートメントを実行できます。これは影響を受けた行数を含むリソースを返します。

INSERT

更新を挿入するには:

$result = odbc_exec($cnx, "INSERT INTO Tweets(Text) VALUES ('My twitter message 2')");
$affected = odbc_num_rows($result);

UPDATE

更新を取得するには:

$result = odbc_exec($cnx, "UPDATE Tweets SET Text = 'My twitter message 2' WHERE From_User_Name = 'twitter'");
$affected = odbc_num_rows($result);

DELETE

更新を削除するには:

$result = odbc_exec($cnx, "DELETE FROM Tweets WHERE Id = '123456789'");
$affected = odbc_num_rows($result);

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