Welcome Guest, Not a member yet? Register   Sign In
Stored Procedure is not executed
#1

[eluser]Rahul gamit[/eluser]
Hii
I am trying to call my stored procedure for inserting the values into the table.
when i am calling the storedprocedure it won't give any error but the data is not inserted in the table.
here is my code,
Code:
CREATE DEFINER=`root`@`localhost` PROCEDURE `tblaccountmaster_add`(
IN p_company_name          VARCHAR(250),
IN p_first_name            VARCHAR(250),
IN p_last_name             VARCHAR(250),
IN p_billing_address       VARCHAR(500),
IN p_city                  VARCHAR(100),
IN p_state                 VARCHAR(100),
IN p_country_id            INT,
IN p_postal_code           VARCHAR(10),
IN p_moible_no             VARCHAR(20),
IN p_primary_phone_no      VARCHAR(30),
IN p_secondary_phone_no    VARCHAR(30),
IN p_fax_no                VARCHAR(30),
IN p_email                 VARCHAR(50)
)
BEGIN
INSERT INTO tblaccountmaster
(
company_name,
first_name,
last_name,
billing_address,
city,
state,
country_id,
postal_code,
mobile_no,
primary_phone_no,
secondary_phone_no,
fax_no,
email
)
VALUES
(
p_company_name,
p_first_name,
p_last_name,
p_billing_address,
p_city,
p_state,
p_country_id,
p_postal_code,
p_mobile_no,
p_primary_phone_no,
p_secondary_phone_no,
p_fax_no,
p_email
);

END

and this is how i am calling my stored procedure from the model
Code:
$sql = "call tblaccountmaster_add
                                (?,
                                ?,
                                ?,
                                ?,
                                ?,
                                ?,
                                ?,
                                ?,
                                ?,
                                ?,
                                ?,
                                ?,
                                ?,
                                )";
        $this->db->query($sql,array($this->company_name,
                            $this->first_name,
                            $this->last_name,
                            $this->billing_address,
                            $this->city,
                            $this->state,
                            $this->country_id,
                            $this->postal_code,
                            $this->mobile_no,
                            $this->primary_phone_no,
                            $this->secondary_phone_no,
                            $this->fax_no,
                                                       $this->email));


thanks in advance ..


Messages In This Thread
Stored Procedure is not executed - by El Forum - 07-28-2011, 08:07 AM
Stored Procedure is not executed - by El Forum - 07-29-2011, 02:19 AM
Stored Procedure is not executed - by El Forum - 07-29-2011, 07:01 PM
Stored Procedure is not executed - by El Forum - 07-29-2011, 11:10 PM
Stored Procedure is not executed - by El Forum - 07-29-2011, 11:14 PM
Stored Procedure is not executed - by El Forum - 07-29-2011, 11:56 PM
Stored Procedure is not executed - by El Forum - 07-30-2011, 05:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB