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 bottom
Post Reply
Post New Topic
Page: 1
TOPIC: User id issue
#152
User id issue 2 Years 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.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Idunnit1
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#153
Re:User id issue 2 Years 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
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Idunnit1
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#155
Re:User id issue 2 Years ago Karma: 5
You could also write id = '@user_id' or `id` = 'user_id'. Note that there is a difference between ` and '.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
tomaz
Moderator
Posts: 282
graph
User Offline Click here to see the profile of this user
Reply Quote
 
Go to top
Post Reply
Post New Topic
Page: 1
Moderators: tomaz
Tools JX, Powered by Joomla!; Joomla templates by SG web hosting