Reports.JS 2016.03.15 - Firebird 2.5 Database
Posted: Fri Apr 01, 2016 4:15 pm
We are millions of users working with Firebird and PHP. The last release of Stimulsoft.JS on 2016.03.15 allows to connect with Firebird 2.5.
If this Works well. It would be great !!!
With the reléase 2016.03.15 you can connect with firebird 2.5 database using this connection string:
"User=SYSDBA;Password=masterkey;Database=path_and_name_Database.FDB;DataSource=localhost;Port=3050;Dialect=3;Charset=NONE;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0;"
We have problems with Date field when we want to format this fields. We already solved this, modifying the file firebird.php
and Suppressing at the end of the file in the function execute ...
utf8_encode($row); -------> ($row);
}
public function execute($queryString) {
$result = $this->connect();
if ($result->success) {
$query = ibase_query($this->link, $queryString);
if (!$query) return $this->getLastErrorResult();
$result->columns = array();
$result->rows = array();
while ($rowItem = ibase_fetch_assoc($query)) {
$row = array();
foreach ($rowItem as $key => $value) {
if (count($result->columns) < count($rowItem)) $result->columns[] = $key;
$row[] = $value;
}
$result->rows[] = utf8_encode($row); }
$this->disconnect();
}
return $result;
If this Works well. It would be great !!!
With the reléase 2016.03.15 you can connect with firebird 2.5 database using this connection string:
"User=SYSDBA;Password=masterkey;Database=path_and_name_Database.FDB;DataSource=localhost;Port=3050;Dialect=3;Charset=NONE;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0;"
We have problems with Date field when we want to format this fields. We already solved this, modifying the file firebird.php
and Suppressing at the end of the file in the function execute ...
utf8_encode($row); -------> ($row);
}
public function execute($queryString) {
$result = $this->connect();
if ($result->success) {
$query = ibase_query($this->link, $queryString);
if (!$query) return $this->getLastErrorResult();
$result->columns = array();
$result->rows = array();
while ($rowItem = ibase_fetch_assoc($query)) {
$row = array();
foreach ($rowItem as $key => $value) {
if (count($result->columns) < count($rowItem)) $result->columns[] = $key;
$row[] = $value;
}
$result->rows[] = utf8_encode($row); }
$this->disconnect();
}
return $result;