Hello everybody
i'm tryng with, my poor knowledge, to create an application were a user after login into the joomla site, can view all his owm records. The code i have wrote gives me an errorš² . Can you give it a look?
The error is "Object of class JUser could not be converted to string in..."
bye-bye :o
i'm tryng with, my poor knowledge, to create an application were a user after login into the joomla site, can view all his owm records. The code i have wrote gives me an errorš² . Can you give it a look?
<?php
$db =& JFactory::getDBO();
$user = JFactory::getUser();
$sql="
SELECT *
FROM `jos_easytables_table_data_4`
WHERE 'user'like '$user'";
$db->setQuery($sql);
$results = $db->loadRowList();
foreach ($results as $result ); {
echo "Tracking_number: " .$result [1]."<br />";
echo "Sender: " .$result [2]."<br />";
echo "Client code: " .$result [3]."<br />";
echo "Status: " .$result [4]."<br />";
}
?>
The error is "Object of class JUser could not be converted to string in..."
bye-bye :o