I have a table with billing information for customers. Each customer have a unique userid which is used to login to my website and a password. The table is linked to joomla registration, this way customers are automatically registered into my website everytime I import the csv into my database.
below is the link to display the table result and form used to populate the table
http://fbcusl.net/sierratel/index.php?option=com_chronoconnectivity&connectionname=Billing_System&Itemid=114
http://fbcusl.net/sierratel/index.php?option=com_chronocontact&Itemid=113
Right now the permissions to view the table results are set to registered users only. But when a registered user clicks on it, all records in the table are displayed. I want only records matching the users information base on their login status/userid enter to be display because it will make no sense displaying other customers billing information
Please help.
Hi click2tman,
Add a where clause using the logged in user id.
Bob
Where do I add that where clause? I already have one in the where clause section for the search functionality.
Yes that's it - if I understand correctly - you need to limit the search to their results.
Bob
MyCode
"<?php $mycurrentuser = JRequest::getVar (username); ?>"
WHERE cf_user_id="<?php echo JRequest::getVar('username') ; ?>"
Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"" WHERE cf_user_id=""' at line 1 SQL=SELECT count(*) FROM main_billingsystem "" WHERE cf_user_id=""
Warning: Invalid argument supplied for foreach() in /home/content/e/d/u/eduportal/html/sierratel/components/com_chronoconnectivity/libraries/connection.php on line 300
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"" WHERE cf_user_id=""' at line 1 SQL=SELECT count(*) FROM main_billingsystem "" WHERE cf_user_id=""
I also tried this but it did not work either
SELECT * FROM `main_billingsystem` WHERE cf_user_id = 62
62 is my joomla userid
All I need is a code to get my current login userid, pass it over and use it in the where clause to display information from the table for that user alone. Please help. This is a school project am working on.
You seem to have a lot of quotes in there. And you are comparing username with user_id
<?php
$user =& JFactory::getUser();
?>
WHERE `cf_user_id` = '<?php echo $user->id; ?>'
Bob
I could get the instances created but the values are not being displayed. I find the blank instances.
I am using Adobe Livecycle Designer 7.1 for designing the form. I have Adobe Reader 7.0.0 installed in my system. Is it a problem? Should I have a version which is higher than that?