Jump to content
N3lson

[Resolvido] Script insere 2 rows de uma só vez

Recommended Posts

N3lson

Boas tenho esta instrução a correr num ficheiro, mas em vez de inserir um row insere 2

$visitas="INSERT INTO visitas (ip, data) VALUES('{$_SERVER['REMOTE_ADDR']}','".date('Y-m-d')."')";
if($_SERVER['REQUEST_URI'] =='/index.php')
{
   mysqli_query($con,$visitas);
}

Não pretendo colocar o ip como UNIQUE


Pagina fazia refresh.

Edited by brunoais
2x post junto

You can't do it, kid. But don't worry, my boy. You're not the only one. No one else can do it.

Share this post


Link to post
Share on other sites
brunoais

Tem que haver outra instrução dessas algures ou a não-redefinição da variável noutra query à base de dados.

Edited by brunoais

"[Os jovens da actual geração]não lêem porque não envolve um telecomando que dê para mirar e atirar, não falam porque a trapalhice é rainha e o calão é rei" autor: thoga31

Life is a genetically transmitted disease, induced by sex, with death rate of 100%.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.