/**
* @return ORA
* @desc Constructor of ORA class.
*/
function ORA(){
}
/**
* @return void
* @desc Method of Server Connection and DB.
*/
function connect($db="XXX",$user="XXXX",$pass="XXX"){
$this->socket = oci_connect($user,$pass,$db);
if ( $this->socket == false ){
echo oci_error($this->socket)."<BR>";
echo "Fail";
exit;
}
}
/**
* @return Result
* @param String $query
* @desc Receive query SQL, execute and retuns, if error returs 0.
*/
function sql($query){
Changed at 20 December 08 / 20:00
It's a good start but we need more functions to include it in FH.
needed functions:
connect
close
query
getInsertId
result
getError
getErrorNo
recordCount
getRecord
getFieldNames
getTables
getNotNullFields
getFieldTypes
escapeString
getPrKeys
getUniqueFields
Is there an easy way to test with an Oracle database?
Since we don't have any experience using Oracle we would apriciate you making a complete class like class.MySQL.php in the yadal directory.
SELECT cols.table_name, cols.column_name, cols.position, cons.status, cons.owner, cons.constraint_type FROM all_constraints cons, all_cons_columns cols WHERE cols.table_name = 'BOL_SISTEMAS' AND cons.constraint_name = cols.constraint_name AND cons.owner = cols.owner ORDER BY cols.table_name, cols.position; DESC BOL_SISTEMAS;DESC BOL_SISTEMAS;SELECT cols.table_name, cols.column_name, cols.position, cons.status, cons.owner, cons.constraint_type FROM all_constraints cons, all_cons_columns cols WHERE cols.table_name = 'BOL_SISTEMAS' AND cons.constraint_name = cols.constraint_name AND cons.owner = cols.owner ORDER BY cols.table_name, cols.position;