Grid 4 PHP allows to set the debug mode on or off:
Debug mode is enabled by default and it will show the server side failure reason.
When debug mode is on and a query fails I get a blank page with the error details. Example:
Couldn’t execute query. Table ‘db.clients’ doesn’t exist – SELECT * FROM customers WHERE 1=1 LIMIT 1 OFFSET 0
If I turn off the debug mode, it still shows a blank page with a more generic (and customizable) message:
Some issues occured in this operation, Contact technical support for help
I don’t want a blank page:
I’d like my PHP page will load as usual and only the grid affected by the SQL issue should not render.
Is it possible to configure Grid 4 PHP (or perhaps it is a more generic PHP feature?) to process the other working part of my page?
Sample code:
<?php
include_once("../../config.php");
include(PHPGRID_LIBPATH."inc/jqgrid_dist.php");
$db_conf = array(
"type" => PHPGRID_DBTYPE,
"server" => PHPGRID_DBHOST,
"user" => PHPGRID_DBUSER,
"password" => PHPGRID_DBPASS,
"database" => PHPGRID_DBNAME
);
$g = new jqgrid($db_conf);
$opt["caption"] = "Customers";
$g->set_options($opt);
$g->table = "clients";
?>
<?php include ('header.php'); ?>
<div class="row flex-nowrap">
<?php include('navigation.php'); ?>
<!-- some other HTML stuff -->
<div class="col">
<?php echo $table?>
</div>
</div>
<?php include('footer.php');
2