Dear Dimon,
im trying to create a stored procedure that when posting a table , it update or create records in another table . here is my code:
DELIMITER $$
DROP PROCEDURE IF EXISTS `jmg_acc2007`.`LdgB4Post_CreateClt` $$
CREATE PROCEDURE `jmg_acc2007`.`LdgB4Post_CreateClt` (LNumb varchar(10), LName varchar(50),LCur varchar (6), LBlngGrp int(11) )
BEGIN
update clients
set Ledger_name = LName
where Ledger_number = LNumb;
if mysql_affected_rows() = 0 then
insert into clients(Ledger_number, Ledger_name, Currency_Code, Client_BelongsToGroup)
values (LNumb, LName, LCur, LBlngGrp);
end if;
END $$
DELIMITER ;
executing this procedure in the MySqlBrowser is working properly , but once i call this procedure from Borland developper studion 2006, it kept giving me that function mysql_affected_rows() does not exist in my database. i know that. its a mysql function. what should i do?