CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Login USER_ID used as filter in Grid??

Print topic Send  topic

Author Message
luna2005

Posts: 4
Posted: 09/01/2009, 2:11 PM

Hi
I don't know how to handle the following situation:

I have a table called PROJECT's. When a user creates a new entry in the table, a field USER_ID stores the USER_ID from Login Form with the CCGetUserID() function.

My problem:
In a grid form which shows all projects from the table, i want to show only the records where the field USER_ID matches the USER_ID from the login form.

Question:
Which values to I have to use in the query builder for the WHERE condition to use the login USER_ID as filter? I tried it with parameter source; {user_id} and as type: session. But the grid shows all records.

ANY HINTS????

Thanks alot.

PS: Sorry, my english is not perfect - i'm a guy from switzerland:-)
View profile  Send private message
Gena

Posts: 591
Posted: 09/01/2009, 2:20 PM

you may want to see this
http://forums.codecharge.com/posts.php?post_id=103535
_________________
Gena
View profile  Send private message
softmafia

Posts: 44
Posted: 09/01/2009, 2:35 PM

Hi Luna I will advice you use a record form instead of a grid , you can use it to achieve what you just explained do exactly what you have done but this time use a record form.
_________________
softmafia
View profile  Send private message
jjrjr1


Posts: 942
Posted: 09/02/2009, 5:42 AM

Hi

If I understand your question correctly what you want to do is:

Show a grid of records who's UserID matches the logged in UserID.

If this is what you are wanting to do all you nees to do is

1. Click into the grid you are working with
2. Click the little 3 dot button next to the table name in the properties window.
3. This brings up query builder so click on the where condition and add a query
4. Select the table field tha contains the UserID
5. Select equals in the condition
6. In the equals target put UserID
7 In the dropdown for type select Session

You now have a grid that will only bring up records who's UserID matches the logged in user.

Let me know if that helps.


_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
luna2005

Posts: 4
Posted: 09/05/2009, 12:10 AM

@ all answers

Hi folks, thanks all lot for the quick replies:-) :-)

All your input's are cool and are working fine. I made a logical fault. I previewed the query in the query builder and, of course, the preview has no access to the running login screen with the user ID. When I started my application online, everything was fine.

Thanks you for the quick help- I really to appreciate that.

greetings from switzerland
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.