Using of variables in SQL query
- Daniel
-
- Offline
- Administrator
-
Hello,
SEF URL do not affect this functionality but as you said It's not working, It means the variable is not available in ID parameter. Please find it out which variable is being used and then update accordingly.
Thanks
Daniel
Please Log in or Create an account to join the conversation.
- Jan Vašátko
-
Topic Author
- Offline
- New Member
-
- Posts: 3
Hello, I found when I use SEF URL (domain/category/id-alias), it is not working. If I put e.g. ?id=123 after it is working. Is it possible to use it with SEF URL?
Please Log in or Create an account to join the conversation.
- Daniel
-
- Offline
- Administrator
-
It seems to be the id variable is not available in GET / POST data. If it is, Please share your FTP & Backend Login credentials via Contact us form, We'll look into it.
Thanks
Daniel
Please Log in or Create an account to join the conversation.
- Jan Vašátko
-
Topic Author
- Offline
- New Member
-
- Posts: 3
I have tried it, but when I use vchart module e.g. in article with id=123
select x, y
from #__table
where id = {id}
does not work (nothing shows). If I set
select x, y
from #__table
where id = 123
it is working. Are there some restrictions or should I use it spcial way-
Please Log in or Create an account to join the conversation.
- Daniel
-
- Offline
- Administrator
-
Hello,
If Article ID is there in get / post data, then it can be used. And in frontend Article ID is available in "id" variable, that's why you should use {id} ( id get variable is available on Article detail layout if you are intending to display the module on Article detail layout )
Thanks
Daniel
Please Log in or Create an account to join the conversation.
- Jan Vašátko
-
Topic Author
- Offline
- New Member
-
- Posts: 3
Hello, you write
I don't understand the usage of the variables - what exactly are these variables? I would like to use SQL select like
select x, y
from #__table
where id = {articleid}
{articleid} should be the ID of the actual article. Can I use it this way? The purpose is to show different chart in every article.
Jan
Please Log in or Create an account to join the conversation.