Preciso de um codigo sql 06.12.14 19:27
Preciso de um codigo sql aqueles que quando o habbo entra no quarto ai quando sai some os mobs alguem me passa o sql pra eu arrumar?
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `getroomitems`(IN `roomid` INT(10) UNSIGNED)
BEGIN
SELECT items_rooms.item_id, items_rooms.x, items_rooms.y, items_rooms.n, items.base_id, items_extradata.dat a, items.rareid, items.group_data
FROM items_rooms
JOIN items ON (items.item_id = items_rooms.item_id)
LEFT JOIN items_extradata ON (items_extradata.ite m_id = items.item_id)
WHERE items_rooms.room_id = roomid;
END//
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'm_id = items.item_id)
WHERE items_rooms.room_id = roomid;
END' at line 6
DROP PROCEDURE IF EXISTS `getroomitems`;[size=11][/size]
DELIMITER ;;[size=11][/size]
CREATE DEFINER=`root`@`localhost` PROCEDURE `getroomitems`(IN `roomid` INT(10) UNSIGNED)[size=11][/size]
BEGIN[size=11][/size]
SELECT items_rooms.item_id, items_rooms.x, items_rooms.y, items_rooms.n, items.base_id, items_extradata.data, items.rareid, items.group_data, items.placedBy[size=11][/size]
FROM items_rooms[size=11][/size]
JOIN items ON (items.item_id = items_rooms.item_id)[size=11][/size]
LEFT JOIN items_extradata ON (items_extradata.item_id = items.item_id)[size=11][/size]
WHERE items_rooms.room_id = roomid;[size=11][/size]
END
DELIMITER $$[size=11][/size]
--[size=11][/size]
-- Procedimientos[size=11][/size]
--[size=11][/size]
CREATE DEFINER=`root`@`localhost` PROCEDURE `getroomitems`([size=11][/size]
IN roomid int(10) unsigned[size=11][/size]
)[size=11][/size]
BEGIN[size=11][/size]
SELECT items_rooms.item_id, items_rooms.x, items_rooms.y, items_rooms.n, items.base_id, items_extradata.data[size=11][/size]
FROM items_rooms[size=11][/size]
JOIN items ON (items.item_id = items_rooms.item_id)[size=11][/size]
LEFT JOIN items_extradata ON (items_extradata.item_id = items.item_id)[size=11][/size]
WHERE items_rooms.room_id = roomid;[size=11][/size]
END$$[size=11][/size]
[size=11][/size]
CREATE DEFINER=`root`@`localhost` PROCEDURE `getuseritems`([size=11][/size]
IN userid int(10) unsigned[size=11][/size]
)[size=11][/size]
BEGIN[size=11][/size]
SELECT items_users.item_id, items.base_id, items_extradata.data[size=11][/size]
FROM items_users[size=11][/size]
JOIN items ON (items.item_id = items_users.item_id)[size=11][/size]
LEFT JOIN items_extradata ON (items_extradata.item_id = items.item_id)[size=11][/size]
WHERE items_users.user_id = userid;[size=11][/size]
END$$[size=11][/size]
[size=11][/size]
DELIMITER ;
Recomendamos a BH Servers com proteção DDOS gratuita em Cloud Server de alta performance. Entrega imediata.