Hello,
I also have trouble to load the name of the user out of the database.
I have a table where every user will have a row.
But I'am not able to load the name in the text field.
1. What should I use ?
- DB Record Loader or
- DB Multi Record Loader
2. If you leave DB Field empty, will all fields load if I only define the user in the query.
I tried to put spelersnaam (field of the usernames in database) in DB Field, also without.
3. The biggest problem what to put in WHERE statement. I already tried:
and
I already had this error in my log:
- PHP Notice: Undefined variable: user in /var/www/amtest/administrator/components/com_chronoforms/form_actions/db_multi_record_loader/db_multi_record_loader.php(275) : eval()'d code on line 2, referer: http://am.****.be/index.php?option=com_content&view=article&id=12&Itemid=117
- PHP Fatal error: Call to a member function get() on a non-object in /var/www/amtest/administrator/components/com_chronoforms/form_actions/db_multi_record_loader/db_multi_record_loader.php(275) : eval()'d code on line 2, referer: http://am.****.be/index.php?option=com_content&view=article&id=12&Itemid=117
I also have trouble to load the name of the user out of the database.
I have a table where every user will have a row.
But I'am not able to load the name in the text field.
1. What should I use ?
- DB Record Loader or
- DB Multi Record Loader
2. If you leave DB Field empty, will all fields load if I only define the user in the query.
I tried to put spelersnaam (field of the usernames in database) in DB Field, also without.
3. The biggest problem what to put in WHERE statement. I already tried:
<?php
$user = &JFactory::getUser();
echo $user->username;
?>
and
<?php
$user->get('username');
echo " `username` = $user ";
?>
I already had this error in my log:
- PHP Notice: Undefined variable: user in /var/www/amtest/administrator/components/com_chronoforms/form_actions/db_multi_record_loader/db_multi_record_loader.php(275) : eval()'d code on line 2, referer: http://am.****.be/index.php?option=com_content&view=article&id=12&Itemid=117
- PHP Fatal error: Call to a member function get() on a non-object in /var/www/amtest/administrator/components/com_chronoforms/form_actions/db_multi_record_loader/db_multi_record_loader.php(275) : eval()'d code on line 2, referer: http://am.****.be/index.php?option=com_content&view=article&id=12&Itemid=117