actually, it is NOT an error. It is the content of the mysql result. I don’t know why.
environment: laravel
data backend: mysql
Error:
Couldn’t execute query. No database selected – SELECT count(*) as c FROM (SELECT * FROM T000115841008282474740 WHERE 1=1) pg_tmp
Checked from internal application log:
data connection OK
table EXISTS.
any hints about this?
in jqgrid.dist.php:
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
ini_set(“display_errors”,”off”);
in application code:
$g->con->debug = 0; // changed from 0 to 1
Error shows database connection issue: No database selected
Please confirm if you are passing correct database credentials to the constructor. e.g.
$db_conf = array(
“type” => PHPGRID_DBTYPE,
“server” => PHPGRID_DBHOST,
“user” => PHPGRID_DBUSER,
“password” => PHPGRID_DBPASS,
“database” => PHPGRID_DBNAME
);
$grid = new jqgrid($db_conf);
And these constants are defined before you call.
I am using the following db_conf. is this ok? $db_conf = array(
“type” => ‘mysqli’,
“server” => env(‘DB_HOST’),
“user” => env(‘DB_USERNAME’),
“password” => env(‘DB_PASSWORD’),
“database” => env(‘DB_DATABASE’),
‘wait_timeout’ => ‘1000’,
‘interactive_timeout’ => ‘1000’,
‘net_read_timeout’ => ‘1000’,
‘unix_socket’ => env(‘DB_SOCKET’, ”),
‘charset’ => ‘utf8mb4’,
‘collation’ => ‘utf8mb4_unicode_ci’,
‘prefix’ => ”,
‘strict’ => false,
‘engine’ => null,
);
I am sending you a sample laravel controller that uses datagrid.
https://gist.github.com/57502cd08b90b90917d829ad91494761
Looks like env(…) data is not being fetched.
You can also try downloading laravel 5.5 complete code from here and compare with your copy.
https://www.gridphp.com/wp-content/uploads/laravel5.5.zip