database Oracel connected but read field in table
database Oracel connected but read field in table
PHP 7.4 AND Database Oracle 12 //Editor 2.0.10
//Connec data
$sql_details = array(
"type" => "Oracle",
"user" => "READU",
"pass" => "READ",
"host" => "192.0.0.1",
"port" => "1521",
"db" => "orct",
"dsn" => "",
"pdoAttr" => array(
)
);
//read data
Editor::inst( $db, 'DATAB.STUDENT_COACH')
->field(
Field::inst( 'ID'),Field::inst( 'STUDENT_ID')
)
Error messages shown:
Fatal error: Uncaught Exception: Oracle SQL error: ORA-00904: "id": invalid identifier in C:\xampp\htdocs\infooracle\datatables\lib\Database\Driver\OracleQuery.php:163 Stack trace: #0 C:\xampp\htdocs\infooracle\datatables\lib\Database\Query.php(1106): DataTables\Database\Driver\OracleQuery->_exec() #1 C:\xampp\htdocs\infooracle\datatables\lib\Database\Query.php(287): DataTables\Database\Query->_select() #2 C:\xampp\htdocs\infooracle\datatables\lib\Editor.php(1117): DataTables\Database\Query->exec() #3 C:\xampp\htdocs\infooracle\datatables\lib\Editor.php(990): DataTables\Editor->_get(NULL, Array) #4 C:\xampp\htdocs\infooracle\datatables\lib\Editor.php(713): DataTables\Editor->_process(Array) #5 C:\xampp\htdocs\infooracle\datatables\controllers\load_infopro.php(44): DataTables\Editor->process(Array) #6 {main} thrown in C:\xampp\htdocs\infooracle\datatables\lib\Database\Driver\OracleQuery.php on line 163
Description of problem:
PHP 7.4 AND Database Oracle 12 //Editor 2.0.10
- Database Connected
- Read data error
Replies
By default Editor will read a primary key field called
id
. You can configure that using the optional third parameter of the instance constructor. e.g.:Note - don't include the primary key as a field, unless you want it to be writeable!
Allan
Thanks so much