Hi !
I have a situation where different users have their own database tables. Tables are named like this:
data_user1
data_user2
data_user3
...and so on.
The structure in every table is the same.
I want to show information to logged in users from their table, but I found this pretty difficult. If I want to show the data, I'll have to configure a different ChronoConnection form to every user individually.
To avoid the huge amount of work, I could introduce a variable to "TableName".
Example:
Instead of selecting the table from drop down menu, I would write some php code to echo the name of wanted table. Code could be something like this:
Then every time the form uploads it checks the username and selects the right table to fetch the data.
And the user interface could look like this:
[attachment=0]variable.jpg[/attachment]
Is this improvement possible to do? Or can I already fetch data like this?
Eemeli
I have a situation where different users have their own database tables. Tables are named like this:
data_user1
data_user2
data_user3
...and so on.
The structure in every table is the same.
I want to show information to logged in users from their table, but I found this pretty difficult. If I want to show the data, I'll have to configure a different ChronoConnection form to every user individually.
To avoid the huge amount of work, I could introduce a variable to "TableName".
Example:
Instead of selecting the table from drop down menu, I would write some php code to echo the name of wanted table. Code could be something like this:
<?php
$user = JFactory::getUser();
echo 'data_' . $user;
?>
Then every time the form uploads it checks the username and selects the right table to fetch the data.
And the user interface could look like this:
[attachment=0]variable.jpg[/attachment]
Is this improvement possible to do? Or can I already fetch data like this?
Eemeli