pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feed[newbie] simple browse / edit form in PHP
2+ messages / 2 participants
[nested] [flat]
* [newbie] simple browse / edit form in PHP
@ 2002-03-13 09:11 Jules Alberts <julesa@arbodienst-limburg.nl>
2002-03-14 21:53 ` Re: [newbie] simple browse / edit form in PHP Chris <csmith@squiz.net>
0 siblings, 1 reply; 2+ messages in thread
From: Jules Alberts @ 2002-03-13 09:11 UTC (permalink / raw)
To: pgsql-php
hi everyone,
i have a test setup with postgresql 7.2, PHP 4, and apache. everything
works fine, PHP generates HTML pages with query results in it. now i
want to create a simple form which shows the current record, and has
these buttons:
- previous, first, next, last record
- delete record
- add record
it sounds very simple, but where do i start? i guess i should make a
stateless connection (the form will be accessed via the web). i figure
i need some sort of recordset, is a CURSOR the right approach? maybe
someone can point me to an example?
TIA
--
Jules.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [newbie] simple browse / edit form in PHP
2002-03-13 09:11 [newbie] simple browse / edit form in PHP Jules Alberts <julesa@arbodienst-limburg.nl>
@ 2002-03-14 21:53 ` Chris <csmith@squiz.net>
0 siblings, 0 replies; 2+ messages in thread
From: Chris @ 2002-03-14 21:53 UTC (permalink / raw)
To: julesa@arbodienst-limburg.nl; pgsql-php
Hi,
>i have a test setup with postgresql 7.2, PHP 4, and apache. everything
>works fine, PHP generates HTML pages with query results in it. now i
>want to create a simple form which shows the current record, and has
>these buttons:
>
>- previous, first, next, last record
>- delete record
>- add record
>
>it sounds very simple, but where do i start? i guess i should make a
>stateless connection (the form will be accessed via the web). i figure
>i need some sort of recordset, is a CURSOR the right approach? maybe
>someone can point me to an example?
For the previous / next buttons, I use 'LIMIT / OFFSET' with the queries.
For example to show 10 records each page,
on the first page:
query = SELECT ..... LIMIT 10 OFFSET 0
the second page:
query = SELECT ..... LIMIT 10 OFFSET 10
etc
For adding or deleting a record, you'll have to do up a form of some type
to get the data.
I'll leave the practicalities to you :)
-----------------
Chris Smith
http://www.squiz.net/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-03-14 21:53 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-03-13 09:11 [newbie] simple browse / edit form in PHP Jules Alberts <julesa@arbodienst-limburg.nl>
2002-03-14 21:53 ` Chris <csmith@squiz.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox