PHP has built-in session control “helpers” - check out the section on "Session Control in PHP” in this article: http://iprodeveloper.com/rpg-programming/php-rpg-perspective-part-4-phpotpourri

If you want to see a DB2 version of the same basic code look at the next article in the series. http://iprodeveloper.com/rpg-programming/php-rpg-perspective-part-5-database-access

But as I noted in my earlier comment - if you use the PHP toolbox (as opposed to directly using the DB2 APIs) you can use a stageful connection which will preserve the result set.

Personally I don’t think using QTEMP for this kind of stuff is a good idea. As has been noted earlier using a User Id or even the PHP session Id as part of the data and having a table that can be shared by all users is probably better.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Nov 4, 2016, at 5:02 PM, Roche, Bob <broche@xxxxxxxxxxxxxxxxx> wrote:

Maybe I was over thinking this. If I'm building a web page, until that page is built I'm in a single job. Maybe I can be safe referencing qtemp at that point. I have to remember all these separate functions in PHP are still being called by one program. I'll get the hang of this yet.
I was worried about using a persistent connection. This is an internal company page, so there is no actual login, it is using a default id for connecting for all users. So I don't completely understand how it maintains the state. My prior web programming experience was CGIDEV2 all programmed for a stateless environment.

I'll get the hang of this yet.
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Friday, November 04, 2016 3:20 PM
To: Web400@Midrange. Web400 <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] PHP and RPG, work file question

If the PHP toolkit is used for the data access it offers the option of maintaining a stageful connection. So that would be a possibility.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Nov 4, 2016, at 3:46 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:

If I understand correctly, Bob would need a pool of stateful DB
connections in order to use the existing program. He didn't say why,
but it could be in order to support UI navigation via within a result
set via on-going dialog with the browser.

If that's the case, then it appears that any rewrite would entail
downloading the entire result set to the browser in a single
request-response cycle. Then performing navigation against a local
result set.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit:
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.midrange.com
_mailman_listinfo_web400&d=DQICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6M
Svd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=O3ZcIDp38vs_
S4bIm9hLlaEEmbrmf3OowHD2UheA-HI&s=CV1asmr8NbovXolPEIxsEKZuBh09n3JabEXc
nx2nCEY&e=
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?u=http-3A__archive.midrange.com_web400&d=DQICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=O3ZcIDp38vs_S4bIm9hLlaEEmbrmf3OowHD2UheA-HI&s=FHkqEi4G9R2fLUt750vzYvbj_VBxzH7cZruzAyRkBNg&e= .


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.midrange.com_mailman_listinfo_web400&d=DQICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=O3ZcIDp38vs_S4bIm9hLlaEEmbrmf3OowHD2UheA-HI&s=CV1asmr8NbovXolPEIxsEKZuBh09n3JabEXcnx2nCEY&e=
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=http-3A__archive.midrange.com_web400&d=DQICAg&c=S6jE3hMA0s16gx2_CUBBn4vjc1odLunI6MSvd_AfdV8&r=Ub_YbVSedaHB7-0yGANN94iTrfkU2nCKT1D5-5Jv01Y&m=O3ZcIDp38vs_S4bIm9hLlaEEmbrmf3OowHD2UheA-HI&s=FHkqEi4G9R2fLUt750vzYvbj_VBxzH7cZruzAyRkBNg&e= .

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.