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

 Empty record randomly displays data

Print topic Send  topic

Author Message
blasalle

Posts: 69
Posted: 06/14/2010, 12:16 PM

I have a number of forms with a grid and record. Prior to selecting a form from the menu the user must select a person ID which is saved as a session variable. Once the person ID has been selected a form is selected. The grid on the form uses the session variable to restrict the available records.

However, after the first form has been selected, subsequent forms correctly populate the grid but also randomly populate the record form with a non-selected record (different person ID), which should be empty until a record from the grid has been selected.

The 'Where statement for the record is:
WHERE p_key = {p_key};

bernie
_________________
Bernie
University of Utah
Salt Lake City, UT USA
View profile  Send private message
saseow

Posts: 744
Posted: 06/15/2010, 12:07 AM

Hi Bernie,

Doesn't sound possible does it if you are assigning a new ID to the session variable each time. I would start by assigning the p_key session variable to NULL or 0 just before a new user is selected and see if that makes a difference.

Trevor
View profile  Send private message
blasalle

Posts: 69
Posted: 06/15/2010, 9:21 AM

Trevor - I think you're solution may work. I think I created the problem by creating a serial primary key for multiple tables with the same variable name 'p_key'. Once this variable gets a value from one form it apparently carries it to the next. So it's kind of a design problem but I think it may be easier to fix via reassigning a value than changing the data tables at this point.

bernie
_________________
Bernie
University of Utah
Salt Lake City, UT USA
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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