0
回答
ssh 怎么调用mysql的存储过程,请相信一些。

这个是存储过程,不知到怎么调用 :



DELIMITER $$

DROP PROCEDURE IF EXISTS `sales`.`getClientMesInfo`$$

CREATE DEFINER=`root`@`%` PROCEDURE `getClientMesInfo`()
BEGIN
    DECLARE num varchar(255); -- ID信息
        -- SELECT  PlaceName from t_base_place;
         SELECT id  from t_client_services   where  t_client_services.id in ( select ServiceID FROM t_client_services_mobaddr where ((DID in(2,3,4,44,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,89,90,91,95,96,101,102,103,104,105,110,111,112,115,116,117,125,128,129,133,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,157,158,159,160,161,162,163,164,165,166,9022,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063 )) or (holderid='3352'))) or t_client_services.id in ( select ServiceID FROM t_client_services_mobpro where ((DID in(2,3,4,44,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,89,90,91,95,96,101,102,103,104,105,110,111,112,115,116,117,125,128,129,133,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,157,158,159,160,161,162,163,164,165,166,9022,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063 )) or (holderid='3352'))) or t_client_services.id in ( select ServiceID FROM t_client_services_other where ((DID in( 2,3,4,44,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,89,90,91,95,96,101,102,103,104,105,110,111,112,115,116,117,125,128,129,133,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,157,158,159,160,161,162,163,164,165,166,9022,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063 )) or (holderid='3352'))) or t_client_services.id in ( select ServiceID FROM t_client_services_mobidomain where ((DID in( 2,3,4,44,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,89,90,91,95,96,101,102,103,104,105,110,111,112,115,116,117,125,128,129,133,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,157,158,159,160,161,162,163,164,165,166,9022,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063 )) or (holderid='3352'))) or t_client_services.id in ( select ServiceID FROM t_client_services_wapsite where ((DID in(2,3,4,44,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,89,90,91,95,96,101,102,103,104,105,110,111,112,115,116,117,125,128,129,133,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,157,158,159,160,161,162,163,164,165,166,9022,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063 ))  or (holderid='3352'))) or t_client_services.id in ( select ServiceID FROM t_client_services_wapsiteva where ((DID in(2,3,4,44,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,89,90,91,95,96,101,102,103,104,105,110,111,112,115,116,117,125,128,129,133,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,157,158,159,160,161,162,163,164,165,166,9022,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063 ))  or (holderid='3352'))) or t_client_services.id in ( select ServiceID FROM t_client_services_website where ((DID in(2,3,4,44,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,89,90,91,95,96,101,102,103,104,105,110,111,112,115,116,117,125,128,129,133,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,157,158,159,160,161,162,163,164,165,166,9022,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063 ))  or (holderid='3352'))) or t_client_services.id in ( select ServiceID FROM t_client_services_phone where ((DID in(2,3,4,44,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,89,90,91,95,96,101,102,103,104,105,110,111,112,115,116,117,125,128,129,133,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,157,158,159,160,161,162,163,164,165,166,9022,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063 ))  or (holderid='3352'))) or t_client_services.id in ( select t_client_services.id FROM t_client_services INNER JOIN t_employee on t_client_services.admincode=t_employee.id where ((AdminCode='3352') or (t_employee.CompanyStructure_Id in (2,3,4,44,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,89,90,91,95,96,101,102,103,104,105,110,111,112,115,116,117,125,128,129,133,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,157,158,159,160,161,162,163,164,165,166,9022,9024,9025,9026,9027,9028,9029,9030,9031,9032,9033,9034,9043,9044,9045,9046,9047,9048,9049,9050,9051,9052,9053,9054,9055,9056,9057,9058,9059,9060,9061,9062,9063))) and 0=0);    
    -- SELECT num;
    END$$

DELIMITER ;

举报
土豆-地瓜
发帖于5年前 0回/465阅
顶部