If a select, fails for instance if something is missing, I get message like
Couldn't execute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1 OFFSET 0' at line 1 – Select * from table where coupon =
Is it possible to adapt the erormessage or at least load the site and echo the message on the site? Is there a szenario for this? In this case I would like to write for instance: "Please add the Parameter coupon in your url like "?coupon=123". Wha is the best szenario to have a fallback message for failing selects?
You can put this condition on page using php code:
$msg = '';
$msg = "Please add the Parameter coupon in your url like ?coupon=123";
$coupon = "1234567";
$coupon =intval( $_GET["coupon"]);
and in query:
->select_command = Select * from table where coupon = $coupon;
and on page, where you want to display message:
if (!empty($msg)) echo $msg;
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?