Jump to content
N3lson

Troca de id

Recommended Posts

N3lson

Boas estou a desenvolver um projecto para uma academia, mas estou aqui á nora com um problema que não sei a razão de tal estar a suceder.

O que se passa é o seguinte criei diversas funções de recolha de dados de determinado atleta, ao clicar nos detalhes do atleta, mostra-me os resultados correctos mas numa parte troca o ID, sendo o id=5 e coloca id=2 (neste exemplo)

Print: https://s7.postimg.cc/3p74altkb/Sem_T_tulo.jpg

O que estará a causar esta troca ???

*********************************************************************************************

Resolvi o problema colocando

$ad = "SELECT * FROM demonstracoes WHERE atleta_id = ".(int)$_GET['id']."";

Mas não queria desta forma,

Edited by N3lson

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
munkbozz

O problema poderá existir devido a essas variavéis globais.

Edited by munkbozz
  • Vote 1

Share this post


Link to post
Share on other sites
HappyHippyHippo

em vez de usares variáveis globais, passa os valores que pretendes como argumentos da função

  • Vote 1

IRC : sim, é algo que ainda existe >> #p@p

Share this post


Link to post
Share on other sites
N3lson

Obrigado :)


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

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.