HI, in my project, i have a table 'Orders' with orders submitted, where some have already completed and others are pending,,,
The status of the order is denoted by a status ('completed' / 'pending')

My problem is this,, I need to display the orders separately in two different sections in my form,,, first i retrieved the completed orders and displayed them using a 'while loop'.

Secondly when i tried to display the pending ones, it still displays the completed ones.
I tried to close the DB connection after the while loop and again reconnect and fetch, but still the problem remains.

Then i tried another DB conn with diff variable names, still it displays the older values.(i.e. the completed orders)

Can somebody help me out with this ?

Or else is there a way to clear the existing values in the variable and re-fill them with a new data set ?

HI, in my project, i have a table 'Orders' with orders submitted, where some have already completed and others are pending,,,
The status of the order is denoted by a status ('completed' / 'pending')

My problem is this,, I need to display the orders separately in two different sections in my form,,, first i retrieved the completed orders and displayed them using a 'while loop'.

Secondly when i tried to display the pending ones, it still displays the completed ones.
I tried to close the DB connection after the while loop and again reconnect and fetch, but still the problem remains.

Then i tried another DB conn with diff variable names, still it displays the older values.(i.e. the completed orders)

Can somebody help me out with this ?

Or else is there a way to clear the existing values in the variable and re-fill them with a new data set ?

would you mind to display here your code that concerns with this problem?
it'll be easier to debug if so. Ϋ

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.