0
我試圖寫的MySQL函數返回的孩子的計數爲一個節點,而我寫這篇代碼MySQL函數沒有返回任何值
CREATE DEFINER=`root`@`localhost` FUNCTION `get_child_count`(`id` INT) RETURNS int(11)
READS SQL DATA
Begin
declare temp int(11);
SELECT count(*) into temp FROM tbl_photo_album where parent_id = id;
return temp;
End
,每次我試圖運行這個功能它配備了沒有。
您是否試過在函數外部執行查詢來查看它是否有效? – Barranka 2014-10-11 06:55:30