写的一个discuz存储过程数据测试

BEGIN

DECLARE i int;
DECLARE p_uid int;
DECLARE p_username VARCHAR(24);
SET i = 1;
WHILE i <12 DO
SELECT uid,username INTO p_uid, p_username FROM pre_common_member_49 ORDER BY RAND() LIMIT 1;

SELECT p_uid , p_username;

INSERT INTO

`discuz`.`pre_publicity_users`
(`pid`, `uid`, `username`, `fromip`, `fromtime`, `extcredits1`, `extcredits2`, `extcredits3`, `extcredits4`, `extcredits5`, `extcredits6`, `extcredits7`, `extcredits8`, `content`) VALUES

('16435049', p_uid, p_username, '192.168.51.53', CURRENT_TIME(), '1', NULL, NULL, NULL, NULL, '1', NULL, NULL, '威望+1 贡献+1 ');

SET i = i + 1;

END WHILE;

END

Continue reading...



about me

  • 陶之11's Blog Name:陶之11 OICQ:14779023 Site:Pao11.com

分类

快捷入口