Markie
Posts: 251
|
| Posted: 11/30/2008, 11:53 AM |
|
In my file upload grid I have a listbox, connected to a different database table. Maybe it's very simple, but in this listbox I only want to show the records which are valid for the user (who is logged in). What do I have to do ?
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
Gena
Posts: 591
|
| Posted: 11/30/2008, 12:03 PM |
|
Do it as usual! Enter in Data Source Property for your Listbox - VQB will be opened. There you can set Order, and WHERE like
id = CCGetUserUD()
etc...
_________________
Gena |
 |
 |
Markie
Posts: 251
|
| Posted: 11/30/2008, 12:33 PM |
|
Wow, I can't believe I haven't seen this simple solution. Thanks again Gena !
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
Gena
Posts: 591
|
| Posted: 11/30/2008, 12:39 PM |
|
Yes, just note that every "list" has this Data Source Property (even Radio buttons, Checkbox List etc).
_________________
Gena |
 |
 |
pbais
Posts: 1
|
| Posted: 12/15/2008, 6:56 AM |
|
Quote :Do it as usual! Enter in Data Source Property for your Listbox - VQB will be opened. There you can set Order, and WHERE like
Can Someone explain this in some more detail? I am new to CCS (trying and considering buying), and if possible, I do not want to use handwritten code - for the sake of maintainability.
I implemented authentication. I made a page showing the value of the logged in user - like this:
"echo (" UserID 1: " . CCGetUserID() );" This shows the right user id.
But when I try to use the session variable 'CCGetUserID() ' in the query retrieving the listbox values (on the same page as I use to check the userID) , I end up with an empty listbox. The query window shows:
FIELD: idUser
CONDTION: Equals(=)
PARAMETER: CCGetUserID()
TYPE: Session
What do I do wrong? Who can help?
|
 |
 |
|