Search Postgresql Archives

Reset the cursor to start from the record 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Hi, ALL,
I'd like to do the following:

[code]
PGresult res = PQprepare();
if( PQresultStatus( res ) != PGRES_COMMAND_OK )
{
// error handling
}
else
{
    PGresult res1 = PQexecPrepared();
    status = PQresultStatus( res1 );
    if( status != PGRES_COMMAND_OK && status != PGRES_TUPLES_OK )
    {
// error handling
    }
    else if( status == PGRES_TUPLES_OK )
    {
        for( int j = 0; j < PQntuples( res1 ); j++ )
        {
// process the recordset
        }
        for( int j = 0; j < PQntuples( res1); j++ )
        {
// process the same recordset again
        }
    }
}
[/code]

Is there a function which just reset the record pointer to 1, so I can reprocess
those records?

Thank you.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux