Dinamic condition based on user->id from Joomla
- ANTONIO RUEDA
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
10 years 4 months ago #1032
by ANTONIO RUEDA
Dinamic condition based on user->id from Joomla was created by ANTONIO RUEDA
Hello,
Is there any option to include a 'extra condition' related to sql query, based on user->id from Joomla.
I want to show information from a table filtering by the id joomla user
Thanks in advance,
Is there any option to include a 'extra condition' related to sql query, based on user->id from Joomla.
I want to show information from a table filtering by the id joomla user
Thanks in advance,
Please Log in to join the conversation.
10 years 4 months ago #1033
by Daniel
Thanks
Daniel
Replied by Daniel on topic Dinamic condition based on user->id from Joomla
Hello Antonio,
Yes it has the feature to include dynamic variables in your SQL query including logged-in User ID
Hope I could precisely reply to your question.
Yes it has the feature to include dynamic variables in your SQL query including logged-in User ID

Hope I could precisely reply to your question.
Thanks
Daniel
Please Log in to join the conversation.
- ANTONIO RUEDA
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
10 years 4 months ago #1034
by ANTONIO RUEDA
Replied by ANTONIO RUEDA on topic Dinamic condition based on user->id from Joomla
Hello Danish,
Could you send me an example.
Is this condition right?
User = <?php return JFactory::getUser()->id; ?>
Thanks
Could you send me an example.
Is this condition right?
User = <?php return JFactory::getUser()->id; ?>
Thanks
Please Log in to join the conversation.
10 years 4 months ago #1035
by Daniel
Thanks
Daniel
Replied by Daniel on topic Dinamic condition based on user->id from Joomla
Hello Antonio,
Here is the example:
userid = {loggedinuserid}
There is an option in back end to write your custom query, you can include the above condition in that query.
userid is column name, you need to change it as per the column name in your database table.
{loggedinuserid} is the keyword which will be replaced automatically with logged in User ID.
Here is the example:
userid = {loggedinuserid}
There is an option in back end to write your custom query, you can include the above condition in that query.
userid is column name, you need to change it as per the column name in your database table.
{loggedinuserid} is the keyword which will be replaced automatically with logged in User ID.
Thanks
Daniel
Please Log in to join the conversation.
- ANTONIO RUEDA
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
10 years 4 months ago #1036
by ANTONIO RUEDA
Replied by ANTONIO RUEDA on topic Dinamic condition based on user->id from Joomla
Hello Danish,
I need additional information. I have created a graphic using the sentence
SELECT Mes, Dato1, DatoGrupo FROM Int_Prueba;
and I get a graphic
When I tried to add the where condtion
SELECT Mes, Dato1, DatoGrupo FROM Int_Prueba WHERE AGENTE='{loggedinuserid}'
I have some error messages
1. Horizontal Value get a empty value and a error message: 'Invalid field: Horizontal Value()'
2. I put the same data serie that the first sentence without where clause, and in this case i can save the graphic, but when I do preview I get the error message: 'Data Column/s for axis#0 cannot be of type string
Please, do you have any documentation with examples about using parameters in sql sentence.
On the anohter hand, do you have any list of joomla parameters that we can use in sql sentence.
Thanks in advance,
I need additional information. I have created a graphic using the sentence
SELECT Mes, Dato1, DatoGrupo FROM Int_Prueba;
and I get a graphic
When I tried to add the where condtion
SELECT Mes, Dato1, DatoGrupo FROM Int_Prueba WHERE AGENTE='{loggedinuserid}'
I have some error messages
1. Horizontal Value get a empty value and a error message: 'Invalid field: Horizontal Value()'
2. I put the same data serie that the first sentence without where clause, and in this case i can save the graphic, but when I do preview I get the error message: 'Data Column/s for axis#0 cannot be of type string
Please, do you have any documentation with examples about using parameters in sql sentence.
On the anohter hand, do you have any list of joomla parameters that we can use in sql sentence.
Thanks in advance,
Please Log in to join the conversation.
- Zaheer Abbas
- Visitor
-
10 years 4 months ago #1037
by Zaheer Abbas
Replied by Zaheer Abbas on topic Dinamic condition based on user->id from Joomla
Hi ANTONIO RUEDA,
Thanks for contact us.Can you please send us your back end login credentials via Contact Us form. We'll look into the issue.
thanks
zaheer
Thanks for contact us.Can you please send us your back end login credentials via Contact Us form. We'll look into the issue.
thanks
zaheer
Please Log in to join the conversation.