Skip to main content
Topic: WHERE Active user (Read 3756 times) previous topic - next topic

WHERE Active user

Hi, how do you get the current id of the logged user in WHERE???

i am not getting anything xd:

transaction_user_id='$_GET[USER_ID]'   >>> just keeps the list loading

transaction_user_id=ActiveUser.user_id >>> errors

transaction_user_id=USER_ID >>> just list everything

transaction_user_id='4' >>> this filters the list but only if u are user with user_id = 4 xd?

Any help?????

Edit okay..... i am really a beginner with this all sorts of stuffs however i was able to tweak the file making it work in this way:

i went to Tbl_transactionsController.php and added some lines of codes:

$cu=get_active_user('user_id');
$db->where("transaction_user_id=$cu");

i manually defined $cu and it works. However everytime i go to the client and the files reload ofc and it will dissapear making it not work again? So how do you add this properly? in the mean time ill stick with this since it works somehow.
There is always time for everything.

Re: WHERE Active user

Reply #1
If you edit the file manually, you should disable publishing the file to avoid overwriting the file everytime you publish your project.
Click on the publish button and select the file that you don't want to overwrite.


Re: WHERE Active user

Reply #2
If you edit the file manually, you should disable publishing the file to avoid overwriting the file everytime you publish your project.
Click on the publish button and select the file that you don't want to overwrite.

Hi yes, that actually helps however there are other things that i really want to work with client since i am just a newbie in php (or in coding)...

One example is,

in adding a record, i have set in mysql that the value should be unique. Well it does make sure that it is unique, but when i am adding a record, the duplicate will not be added but still the success message shows up. I can only see duplicate error when editing...

I am planning to get a license for the software because somehow i find it good despite of some bugs or idk things i am experiencing, however do i get a faster support for my queries? The forums seems not that active
There is always time for everything.