I'm having issues calling a stored function in MYSQL DB from a PHP -v5.3.29 application.Below is my Stored procedure in MySql
It outputs a total number of working days between two given days
Code(in PHP) to call this stored function is written below:
$db = dbLink();
$result = $db->query("SELECT WORKDAYS('2018-04-01','2018-04-08')");
if (!$result) {
die('Could not query:' . mysql_error());
}
echo '<script>';
echo 'console.log('. json_encode( $result ) .')';
echo '</script>'
Problem is when I try to call this stored function from a PHP application I get returned an object with Null attributes.
I'm writing the output '$result' on web console and the screenshots are attached below. $result object on web console