List based on current user

List based on current user

AndycalAndycal Posts: 1Questions: 0Answers: 0

I'm looking to add data to a table that will have a column for "user" which will be the usernames of people who have accounts on my site.
I then want to show a table that only shows the rows that contain the current logged in user's username.
Any ideas how I'd do this? Is it even possible?

Replies

  • rf1234rf1234 Posts: 2,947Questions: 87Answers: 416

    Are you using Editor? Are you using an SQL database? What is your server platform? This is the Editor code that does this for PHP:

    //only for the user of this session
    ->where( 'yourTable.user_id', $_SESSION['id'] )
    
This discussion has been closed.