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

 [SOLVED] Listbox question: only records from user

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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?
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.

MS Access to Web

Convert MS Access to Web.
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.