skip to Main Content

Postgresql – how to insert multiple commands into a prepared statement

The problem is that putting queries together, I got this "error: cannot insert multiple commands into a prepared statement". What can I do? q1=" set search_path to care; SELECT COALESCE(c.date,a.date,jq.date,jn.date) reportmonth,registration,emailverified,application,submitted,eligible,jqtest,selected,joined from ( SELECT date_trunc('month', createdon)::date as date, count(1) as…

VIEW QUESTION

Data not returned in variable using Laravel's View Composer

I'm using view composer in Laravel as follows: namespace AppProviders; use IlluminateSupportServiceProvider; use IlluminateSupportFacadesView; use AppModelsGreen; use AppModelsBlue; class SidebarServiceProvider extends ServiceProvider { public function boot(): void { View::composer('layouts.sidebar', function ($view) { $dataGreen = Green::all(); $dataBlue = Blue::all(); $view->with([ 'green'…

VIEW QUESTION

How to build Laravel + PostgreSQL project?

I want to build Laravel + PostgreSQL existing Project. config.php 'pgsql' => [ 'driver' => 'pgsql', 'url' => env('DATABASE_URL', "pgsql://postgres:[email protected]:5432/crawler"), 'host' => env('DB_POSTGRES_HOST', '127.0.0.1'), 'port' => env('DB_POSTGRES_PORT', '5432'), 'database' => env('DB_POSTGRES_DATABASE', 'crawler'), 'username' => env('DB_POSTGRES_USERNAME', 'postgres'), 'password' => env('DB_POSTGRES_PASSWORD', '123'),…

VIEW QUESTION
Back To Top
Search