Хранимые процедуры + PHP
Всем привет, помогите разобраться с хп.
Простой пример:
CREATE PROCEDURE select_data (in id int, out result int)
BEGIN
SET @rs = concat('select name from names where id=', id);
PREPARE rs FROM @rs;
EXECUTE rs;
SET result = rs;
END
Правильно ли он написан?
Теперь я так понимаю, что из PHP мне нужно вызвать хп так: call select_data(1, @result); ?
А как теперь получить в PHP @result - чтобы дальше с ним работать?
Спасибо.
-----
Deadangel is falling ...
Subject
Views
Written By
Posted
Хранимые процедуры + PHP
7933
October 20, 2009 12:34PM
3288
October 21, 2009 10:24AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.