Ad
How To Know Laravel Connect With Oracle Oci8 And Select Statment Write
Here is my Code in laravel with Oci8. i get this result
oci8 statement resource @364
. does anyone know what is issue? how to connect and use select statement.
$users = oci_connect('LE2', 'LE2', '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.55.5)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = ORCL)))');
if (!$users) {
dd("no coonection");
}else{
$ss = oci_parse($users, "SELECT * FROM v_doctor_list");
dd($ss);
}
Ad
Answer
use yajra library to connect laravel to oracle you can use this code to test connection
if (DB::connection('your-connection-name')->getDatabaseName()) {
echo "connected"
}else{
echo "not connected"
}
Ad
source: stackoverflow.com
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS - Conditionally Load a Different Page
- → Make a Laravel collection into angular array (octobercms)
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
- → Validating fileupload(image Dimensions) in Backend Octobercms
- → OctoberCMS Fileupload completely destroys my backend
- → How do I call the value from another backed page form and use it on a component in OctoberCms
Ad