0
Hello is basically the following is a Webgame where every 5 min runs the regeneration command, the command would be this:
UPDATE
`_personagens`
SET
vida = IF(
vida +(vida_m * 0.05)> vida_m,
vida_m,
vida +(vida_m * 0.05)
),
chakra = IF(
chakra +(chakra_m * 0.05)> chakra_m,
chakra_m,
chakra +(chakra_m * 0.05)
)
WHERE
`referencia` NOT IN (
(
SELECT
`jogador`
FROM
`batalha_npc`
),
(
SELECT
`jogador_1`
FROM
`pvp_combates`
),
(
SELECT
`jogador_2`
FROM
`pvp_combates`
)
)
The problem basically is NOT IN
that does not query two tables and returns 0 always, are two distinct tables, that of "Combat against the computer" and "Against other players" not to cure them during combat.
if there are 2 different tables, should have a
or
with 2not in
, for examplereferencia not in (select ...) or referia not in (select outra tabela)
– Ricardo Pontual