2017-06-02 02:51:37 +02:00
|
|
|
|
--TEST--
|
2017-10-04 23:22:56 +02:00
|
|
|
|
Fetch array of extended ASCII data using a scrollable buffered cursor
|
2017-06-02 02:51:37 +02:00
|
|
|
|
--SKIPIF--
|
2017-11-08 00:31:55 +01:00
|
|
|
|
<?php require('skipif_versions_old.inc'); ?>
|
2017-06-02 02:51:37 +02:00
|
|
|
|
--FILE--
|
|
|
|
|
<?php
|
2017-11-08 00:31:55 +01:00
|
|
|
|
require_once('MsCommon.inc');
|
2017-06-02 02:51:37 +02:00
|
|
|
|
|
|
|
|
|
// Connect
|
2017-11-08 00:31:55 +01:00
|
|
|
|
$conn = AE\connect(array('CharacterSet'=>'UTF-8'));
|
2017-06-02 02:51:37 +02:00
|
|
|
|
|
|
|
|
|
// Create table
|
2017-11-08 00:31:55 +01:00
|
|
|
|
$tableName = 'exAsciiTest';
|
|
|
|
|
$columns = array(new AE\ColumnMeta('CHAR(10)', 'ID'));
|
|
|
|
|
AE\createTable($conn, $tableName, $columns);
|
2017-06-02 02:51:37 +02:00
|
|
|
|
|
|
|
|
|
// Insert data
|
2017-11-08 00:31:55 +01:00
|
|
|
|
$res = null;
|
|
|
|
|
$stmt = AE\insertRow($conn, $tableName, array('ID' => 'Aå_Ð×Æ×Ø_B'));
|
2017-06-02 02:51:37 +02:00
|
|
|
|
|
|
|
|
|
// Fetch data
|
|
|
|
|
$query = "SELECT * FROM $tableName";
|
2017-11-10 23:23:38 +01:00
|
|
|
|
$stmt = sqlsrv_query($conn, $query, [], array("Scrollable"=>"buffered"));
|
2017-06-02 02:51:37 +02:00
|
|
|
|
|
|
|
|
|
// Fetch
|
|
|
|
|
$row = sqlsrv_fetch_array($stmt);
|
|
|
|
|
var_dump($row);
|
|
|
|
|
|
2017-11-08 00:31:55 +01:00
|
|
|
|
dropTable($conn, $tableName);
|
|
|
|
|
|
2017-06-02 02:51:37 +02:00
|
|
|
|
// Close connection
|
|
|
|
|
sqlsrv_free_stmt($stmt);
|
|
|
|
|
sqlsrv_close($conn);
|
|
|
|
|
print "Done"
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
--EXPECT--
|
|
|
|
|
array(2) {
|
|
|
|
|
[0]=>
|
|
|
|
|
string(16) "Aå_Ð×Æ×Ø_B"
|
|
|
|
|
["ID"]=>
|
|
|
|
|
string(16) "Aå_Ð×Æ×Ø_B"
|
|
|
|
|
}
|
|
|
|
|
Done
|