I was hoping that there would be a readonly system or session variable such as @@username or @@user_id or similar

Is there any way I can access username information inside an SQL database please? I am hoping to use it to render certain ROWS visible/invisible in views

This would be the username they used when connecting to the database

Thanks in advance

Found it!

I can do it with user() function :D



Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.