Jump to content

niveis e subniveis


diokhan
 Share

Recommended Posts

boas,

tenho uma duvida, eu no meu projecto preciso de listar toda a informação que vou buscar a base de dados, existe ao inicio só os dados com o LEVEL = 1, e em frente a cada registo um botão para aparecer os registos de LEVEL = 2 e que o EC seja '*.%', o * significa que vai apanhar o EC do registo anterior de LEVEL = 1, o % significa que vai mostrar todos, porque há ate ao LEVEL = 4.

exemplo:

EC | LEVEL | NAME | INFO

1  |      1    | Teste | (botao)

2  |      1    | Teste2| (botao)

e ao clicar no botão vai aparecer:

EC | LEVEL | NAME | INFO

1.1 |    2    | teste | (botao)

1.2 |    2    | teste | (botao)

espero ter explicado bem a ideia, o EC seguinte é sempre referente ao EC anterior

...Join the dark side...and get a free cookie...

Link to comment
Share on other sites

já consegui fazer o que queria, passei no link o EC

ficou assim:

<a href=restrito.php?opcao=enzyme_sublevel2&ec=$r->EC>

e na outra pagina fiz assim na query:

$paginacao->sql = "SELECT * FROM ENZYME WHERE LEVEL = 2 AND EC LIKE '$ec.%' ORDER BY EC ASC";

e ficou a funcionar como queria..obrigado pela ajuda B)

...Join the dark side...and get a free cookie...

Link to comment
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
 Share

×
×
  • 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.