Ir para conteúdo

Featured Replies

Postado

oi galera estou tentando 

SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1 ) FROM `player_items` WHERE CONVERT(`attributes` USING latin1 ) LIKE '%timerOnExp%'

Recebo os seguintes resultados

consulta.png

 

a idéia é usá-lo em um globalvent

 

if timerOnExp < os.time() then

delete items

end

 

  • Respostas 23
  • Visualizações 1.6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `at

  • luanluciano93
    luanluciano93

    -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `at

  • luanluciano93
    luanluciano93

    -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`sid`, CONVERT(`attributes` USING latin1) AS `attr` F

Postado
-- <talkaction words="!test" script="teste.lua" />

function onSay(player, words, param)
	local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'")	
	if resultId then
		repeat
			local test1 = result.getStream(resultId, "attr")
			local test2 = result.getString(resultId, "attr")
			local test3 = tonumber(test1)
			local test4 = tonumber(test2)
			player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "test 1: " .. test1 .. " (stream), test 2:" .. test2 .. " (string), test 3: ".. test3 .." (number-stream) and test 4: ".. test4.." (numer-string).")
		until not result.next(resultId)
	end
	return false
end


Send me result ...

Editado por luanluciano93 (veja o histórico de edições)

Postado
  • Autor
22 horas atrás, luanluciano93 disse:

-- <talkaction words="!test" script="teste.lua" />

function onSay(player, words, param)
	local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'")	
	if resultId then
		repeat
			local test1 = result.getStream(resultId, "attr")
			local test2 = result.getString(resultId, "attr")
			local test3 = tonumber(test1)
			local test4 = tonumber(test2)
			player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "test 1: " .. test1 .. " (stream), test 2:" .. test2 .. " (string), test 3: ".. test3 .." (number-stream) and test 4: ".. test4.." (numer-string).")
		until not result.next(resultId)
	end
	return false
end


Send me result ...

 

 

image.png

 

image.png

 

:(

Postado
-- <talkaction words="!test" script="teste.lua" />

function onSay(player, words, param)
	local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'")	
	if resultId then
		repeat
			local test1 = result.getStream(resultId, "attr")
			local test2 = result.getString(resultId, "attr")
			local test3 = tonumber(test1)
			local test4 = tonumber(test2)
			
			if test1 then print(test1) end
			if test2 then print(test2) end
			if test3 then print(test3) end
			if test4 then print(test4) end

		until not result.next(resultId)
	end
	return false
end

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo