This commit is contained in:
v-kaywon 2017-03-31 13:59:30 -07:00
Родитель d87c03f5a8
Коммит 9d033e716a
2 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -2041,7 +2041,6 @@ namespace core {
SQLSMALLINT num_cols;
r = ::SQLNumResultCols( stmt->handle(), &num_cols );
CHECK_SQL_ERROR_OR_WARNING( r, stmt ) {
throw CoreException();
}

Просмотреть файл

@ -25,17 +25,27 @@ $stmt = $conn->prepare($sql);
$stmt->execute();
if ($conn->errorCode() == "00000")
echo "prepare OK\n";
else
echo "unexpected error at prepare";
//test prepare, with args
$stmt = $conn->prepare($sqlWithParameter);
$stmt->execute(array(':id' => $sqlParameter));
if ($conn->errorCode() == "00000")
echo "prepare with args OK\n";
else
echo "unexpected error at prepare with args";
//test direct exec
$stmt = $conn->exec($sql);
if ($conn->errorCode() == "00000")
$err = $conn->errorCode();
if ($stmt == 0 && $err == "00000")
echo "direct exec OK\n";
else
if ($stmt != 0)
echo "unexpected row returned at direct exec\n";
if ($err != "00000")
echo "unexpected error at direct exec";
$Statement = $conn->exec("IF OBJECT_ID('foo_table', 'U') IS NOT NULL DROP TABLE foo_table");