Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Hi Mick,
It is possible, you do this:
<?php
//AutoMaker.php
use \koolreport\dashboard\sources\PDOSource;
class AutoMaker extends PDOSource
{
protected function connection()
{
return [
"connectionString"=>"oci:dbname=yoursid",
"username"=>"yourusername",
"password"=>"yourpassword",
"charset"=>"utf8"
];
}
}
I try to use:
//AutoMaker.php
use \koolreport\dashboard\sources\PDOSource;
class AutoMaker extends PDOSource
{
protected function connection()
{
return [
"connectionString"=>"oci:dbname=yoursid",
"username"=>"yourusername",
"password"=>"yourpassword",
"charset"=>"utf8"
];
}
}
I try to get data form table, but cant get any data.
return AutoMaker::table("mytable")->limit(20);
The query builder has not fully supported oracle that why you see this issue. There are two options:
First, you can do below command to limit row:
return AutoMaker::table("mytable")->where("ROWNUM","<",20);
or universally, you can use rawSQL()
like following
return AutoMaker::rawSQL("
SELECT * FROM mytable
FETCH FIRST 20 ROWS ONLY
");
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo