熱門服務(wù)
眾多企業(yè)的選擇




select `a`.`id` AS `id`,`a`.`cate_id` AS `cate_id`,`a`.`title` AS `title`,`a`.`seotitle` AS `seotitle`,`a`.`keywords` AS `keywords`,`a`.`description` AS `description`,`a`.`note` AS `note`,`a`.`hits` AS `hits`,`b`.`val` AS `val` from (`yb`.`cms_list` `a` join `yb`.`cms_list_c` `b`) where (`a`.`id` = `b`.`id`)下面是存儲(chǔ)過程:
CREATE DEFINER=`root`@`localhost` PROCEDURE `insert_into_tables`()BEGIN declare done INT DEFAULT FALSE; declare v_title VARCHAR(255); declare v_keywords VARCHAR(255); declare v_description LONGTEXT; declare v_hits INT(10); declare v_val MEDIUMTEXT; declare cur CURSOR FOR select title,keywords,description,hits,val FROM news_view; declare CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; OPEN cur; read_loop: LOOP FETCH cur into v_title,v_keywords,v_description,v_hits,v_val; IF done THEN LEAVE read_loop; END IF; insert into cf_1_news (catid, title,keywords,description,hits,status,uid,author,link_id,tableid) VALUES (999, v_title,v_keywords,v_description,v_hits,1,1,"danhanshang",0,0); insert into cf_1_news_data_0 (id,uid, catid,content) VALUES (LAST_insert_ID(),1,999, v_val); END LOOP; CLOSE cur;END
【版權(quán)聲明】:本站內(nèi)容來自于與互聯(lián)網(wǎng)(注明原創(chuàng)稿件除外),供訪客免費(fèi)學(xué)習(xí)需要。如文章或圖像侵犯到您的權(quán)益,請(qǐng)及時(shí)告知,我們第一時(shí)間刪除處理!謝謝!
售后服務(wù):13534259410 (7×24小時(shí))
在線 Q Q:253849310 (售前咨詢)
深圳無雙科技,專注于深圳網(wǎng)站建設(shè)、深圳網(wǎng)站設(shè)計(jì)、深圳網(wǎng)站制作。
服務(wù)客戶超3000家,一站式網(wǎng)站建設(shè)及推廣營(yíng)銷解決方案提供商。
我們的價(jià)值觀:誠(chéng)信、坦誠(chéng)、盡責(zé)、創(chuàng)新。期待與您合作!