I have issue in call stored procedure with null value in Codeigniter 3.
I'm trying this in Model
Also I tried with
some time $fooname is null at that time CI3 return below error
Please help me how to fix it.
I'm trying this in Model
Code:
$foo_sql = $this->db->query('call getFooData(' . $foo_id . ', "' . $fooname . '")');
$result_arr = $foo_sql->result_array();Also I tried with
Quote:call getFooData(2152, NULL)
Code:
DELIMITER $$
CREATE DEFINER=`foodb`@`localhost` PROCEDURE `getFooData`(IN `foo_id` INT, IN `foo_name` VARCHAR(255))
BEGIN
IF foo_id!='' and foo_name!='' THEN
SELECT
*
FROM
`tblFoodata`
WHERE `vFooName` = foo_name AND `sc`.`iFooId` = foo_id
END IF;
END$$
DELIMITER ;some time $fooname is null at that time CI3 return below error
Quote:Call to a member function fetch_assoc() on boolean
Please help me how to fix it.