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

 [Resolved] Next record in a grid anyone?

Print topic Send  topic

Author Message
ommadawn

Posts: 18
Posted: 08/11/2014, 10:09 AM

Hi guys,

I've been pulling my hair out over this one...

In the BeforeShowRow event is there anyway to inspect the data in the next row?

Much appreciated if anyone know.

View profile  Send private message
eratech


Posts: 513
Posted: 08/13/2014, 1:13 AM

Just off the top of my head, I think it might cause a problem if the recordset is being stepped through row-by-row. If you use the
datasource->next_record()
it moves the pointer so you lose the current row to reference.

You could probably load the recordset into a separate array and step through it separately to the main recordset.

Alternatively - what are you trying to do and maybe we can find a different method?

E
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
ommadawn

Posts: 18
Posted: 08/13/2014, 5:16 AM

Hi eratech,

Thanks for getting back to me. I have since resolved this using the following in the BeforeShowRow event:

$NEXT_ROW = mysql_fetch_array($Grid->ds->Query_ID);

and getting the data from it with

$NEXT_RECORD = $NEXT_ROW["personname"];

Then I reset the mysql pointer with the following:
@mysql_data_seek($Grid->ds->Query_ID,$MYSQL_ROW);

I used a global var to keep track of the row number and iterated it each time (MYSQL_ROW) after reading the array.

Regards.

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.