Welcome, Guest
Please Login or Register.    Lost Password?

User id issue
(1 viewing) (1) Guest
This is the optional Forum header for the Suggestion Box.
Go to bottomPage: 1
TOPIC: User id issue
#152
User id issue 6 Months, 2 Weeks ago Karma: 0
Hi,

I am having a problem with the 'id' = '@user_id' command. What I want is the person that is logged in to only see the data from a table that has there id on it. If I remove the command then the person can see all the data from the table. When the command is in the where box then the logged in person gets a message "no records found". I am probably doing something stupid as I am new to this.

any help will be welcome.
Idunnit1
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#153
Re:User id issue 6 Months, 2 Weeks ago Karma: 0
The solution has now been found.

I have found the fix through e-mail which was very quick.

The solution for my problem was to add uid=@user_id in the WHERE box instead of 'id' = '@user_id'.

Thanks again for the help
Idunnit1
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#155
Re:User id issue 6 Months, 2 Weeks ago Karma: 1
You could also write id = '@user_id' or `id` = 'user_id'. Note that there is a difference between ` and '.
tomaz
Expert Boarder
Posts: 82
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Tools JX, Powered by Joomla!; Joomla templates by SG web hosting