Я написал хранимую процедуру, которая работала на моей локальной машине, но на сервере она не выполняет! It would be great to have help
The stored procedure is
DROP PROCEDURE `ASKUS_INSERT`//
CREATE DEFINER=`root`@`localhost` PROCEDURE `ASKUS_INSERT`(
SENDERCONSUMERID INT(11),
QUESTION_POSTED TEXT,
DESCRIPTION_POSTED TEXT,
NETWORK_ID INT(11),
COMMTYPEID INT(11),
CONSUMERID INT(11),
CATEGORY_ID INT(11),
ACTIONID INT(11),
QUESTION_SLUG TEXT
)
BEGIN
DECLARE LASTINSERTEDID INT DEFAULT 0;
DECLARE GETTIPSAMOUNT INT По умолчанию 0;
объявить getTipsAmountConsumer int default 0;
declare sentipsAmountconsumer int default 0;
dercare checkcounttipsexist int default 0;
select count (*) intectcounttipsexist int action_meprise_mapping where action_id actionid; activecount upexountip> actionscountip> actioncountip> actionscountip_mentipse_mappise where action_id = action actionip Затем
выберите sum (tip_amount) в getTipsAmount от action_enterprise_mapping, где action_id = actionid;
else
установить getTipsAmount = 0;
end if;
select conment_tips в getTipsAmountConsumer из consumer_profile, где contips_id = senderconsumerid;
set setitipsAmountConsumer = getTipsAmountConsumer + getTipsAmount;
insert inwith_communcation (Communication_id, sender_consumer_id, network_comm_type_id, parent_communications_id, is_active, last_mod_time, consumer_id) значения ('', senderconsumerid, commtypeid, '0', '1', now (), consumerid); br />
set lastInstid = last_int_ins_ид. /> Обновление Consumer_profile SET COUNTER_TIPS = SettipSAmountConsumer, где Consumer_ID = SenderCONSUMERID;
insert in consumer_action_log (action_log_id, action_id, consumer_id, toping_amount, last_mod_time, communication_id, comm_te_id) значения ('', ActionId, SenderCONSUMERID, GetTipsAmount, теперь (), LastinSertedId, ActionId);
INSERT в network_communications_message (network_communication_message_id, communication_id, субъект, сообщение, is_active, last_mod_time, obster_slug) значения ('', lastinsertedid, obster_posted, description_posted, '1', теперь (), obster_slug); Communication_interest_mapping (id, consumer_interest_expert_id, consumer_id, communication_id, in_network, last_mod_time) значения ('', Category_id, senderconsumerid, lastinsertedid, network_id, now ());
if sendercOnsumerId! = 0 и ConsumerId! = 0 и SenderCONSUMERID! = ConsumerID, затем
INSERT в Consumer_Notification (Consumer_Notification_ID, Consumer_id, Sender_consumer_id, action_id, communication_id, is_acti ('', Consumerid, SenderConsumerid, Commtypeid, LastinsertedId, '1', теперь ());
end if;
end
< /pre>
говорит, что есть много ошибок синтаксиса, а также неизвестные переменные. В этом случае это не должно работать в моем местном хосте. Но это так! Я в замешательстве!
Подробнее здесь: https://stackoverflow.com/questions/526 ... -on-server
Хранящаяся процедура работает на локальном, но не будет выполняться на сервере ⇐ Php
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение