Here below, 3 storage procedure to do a mass creation of node in demo tree
How to add 50 new nodes in English demo tree ??
call generation_demo(50,'ENG');
CREATE DEFINER=root@localhost PROCEDURE add_arbo_enfant_demo(IN param_parent INT(10), IN language VARCHAR(3))
BEGIN
DECLARE v1 INT;
DECLARE a INT;
DECLARE b INT;
DECLARE c VARCHAR(200);
DECLARE cur1 CURSOR FOR SELECT parent, order, MD5(ROUND(RAND()*10000) ) VAL_RANDOM FROM mt_demo WHERE parent = param_parent ORDER BY order DESC LIMIT 1;
CREATE DEFINER=root@localhost PROCEDURE add_arbo_parent_demo(IN param_parent INT(10), IN param_enfant INT(10), IN language VARCHAR(3))
BEGIN
DECLARE nouveau INT DEFAULT 0;
DECLARE v1 INT;
DECLARE a INT;
DECLARE b INT;
DECLARE c VARCHAR(200);
DECLARE cur1 CURSOR FOR SELECT parent, order, MD5(ROUND(RAND()*10000) ) VAL_RANDOM FROM mt_demo WHERE parent = param_enfant ORDER BY order DESC LIMIT 1;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET nouveau = 1;
Hello,
To acces to technical documentation under version MT0.10 use
http://localhost/MT0.10/indextech.php
To acces to demi tree
http://localhost/demo/
Only available with full package
Here below, 3 storage procedure to do a mass creation of node in demo tree
How to add 50 new nodes in English demo tree ??
call generation_demo(50,'ENG');
CREATE DEFINER=
root@localhostPROCEDUREadd_arbo_enfant_demo(INparam_parentINT(10), INlanguageVARCHAR(3))BEGIN
DECLARE v1 INT;
DECLARE a INT;
DECLARE b INT;
DECLARE c VARCHAR(200);
DECLARE cur1 CURSOR FOR SELECT
parent,order, MD5(ROUND(RAND()*10000) ) VAL_RANDOM FROMmt_demoWHEREparent= param_parent ORDER BYorderDESC LIMIT 1;END
CREATE DEFINER=
root@localhostPROCEDUREadd_arbo_parent_demo(INparam_parentINT(10), INparam_enfantINT(10), INlanguageVARCHAR(3))BEGIN
DECLARE nouveau INT DEFAULT 0;
DECLARE v1 INT;
DECLARE a INT;
DECLARE b INT;
DECLARE c VARCHAR(200);
DECLARE cur1 CURSOR FOR SELECT
parent,order, MD5(ROUND(RAND()*10000) ) VAL_RANDOM FROMmt_demoWHEREparent= param_enfant ORDER BYorderDESC LIMIT 1;DECLARE CONTINUE HANDLER FOR NOT FOUND SET nouveau = 1;
END
CREATE DEFINER=
root@localhostPROCEDUREgeneration_demo(INnombreINT(10), INlanguageVARCHAR(3))BEGIN
END
Last edit: Siby 2013-03-05