Subject Re: Reformatted
Author dogrocket2003
--- In, masotti <masotti@...> wrote:
> Hi Jay,
> try to be more precise, but this is more or less a support question.
> can find a lot of samples searching in firebird-support newsgroup.
> $stmtf = "SELECT * FOR 1 SKIP ? FROM APPLIED";
> is only a better solution than your, but not optimal.
> This is a select for a single record, skipping "n" record before.
> This has some caveats in multi user environment because:
> 1) is a nonsense without an ORDER BY on a UNIQUE index.
> 2) is a nonsense through different transactions, as every script start
> begins a new IBASE_DEFAULT transaction that is committed at the end of
> the PHP script.
Im just guessing but a single record at a time is good I take it until
you get into a high load system. Doesnt a dataset or is it called
page in database terms actually reside in a buffer making it less
laborious on system as far as disk access?
> I can leave you with this simple Zen exercise, useful to understand
> better the situation: what is recorn number N-1 when someone can insert
> a record between N-1 and N when you are at record N and you want to
> retrieve the record you have read before?
LOL... that'l give you a headache! But its true the sequential
nature of dataset is only good until someone else makes an update.

> As a solution approach, I tend to read a filtered result set in an
> in-memory PHP associative array, then manage to read data from there
Im having to use the array approach myself, its almost the reverse of
master / child view. The data in array tells main table fetch to
ignore certain records for display.

> through direct AJAX (not ajaxCall()). INSERT, UPDATE and DELETE
> management depends from application's type.
So is this the ajax mode that is fastest? If we are not scared of old
browser imcompatibilty, then ajax should always be used for data
intensive scripts?

> Ciao.
> Mimmo.
Thanks again, and good luck with that firebird / php driver build,
that sounds like some work.