Subject | Re: [firebird-php] Inserted record cannot be selected |
---|---|
Author | Almond |
Post date | 2003-11-14T10:26:28Z |
At 09:19 03/11/14 +0100, you wrote:
is through a stored procedure and not a query.
The process is like that.
1. Insert the record through stored procedure in php.
2. The next query to get the new record in php failed.
3. I open an isql console and execute the same query used in php.
4. isql still didn't get the query result.
5. Execute 'commit' in isql.
6. Re-run the query, the new record appear.
I remember there is an auto-commit option, how to set ?
Best regards,
Almond Wong
>Thomas wrote:The select query is following the insert inside php. Except that the insert
> > This is because of the PHP default transaction, which is automatically
> > committed or rolled back on script termination.
>
>Not really because of that. Read more carefully ;)
>
> >>I insert a record through a "execute procedure" query in PHP, and I found
> >>that the new inserted
> >>record cannot be retrieved until I execute a "commit" through isql.
> >>
> >>Is that I can force the write in a stored procedure ?
>
>The stored produre DID write the record. Reading this, my guess is that
>you are using isql to monitor table, and PHP to do the work. So when you
>do SELECT in isql, you are in transaction until you "commit" it. If you
>do SELECT in isql and then run something from PHP, it will be written to
>database, but you won't see it from isql, since it didn't exists at the
>time you started isql transaction. That's why you have to commit, and
>next select (new transaction) shows data.
>
>HTH
is through a stored procedure and not a query.
The process is like that.
1. Insert the record through stored procedure in php.
2. The next query to get the new record in php failed.
3. I open an isql console and execute the same query used in php.
4. isql still didn't get the query result.
5. Execute 'commit' in isql.
6. Re-run the query, the new record appear.
I remember there is an auto-commit option, how to set ?
Best regards,
Almond Wong
>--[Non-text portions of this message have been removed]
>Milan Babuskov
><http://fbexport.sourceforge.net>http://fbexport.sourceforge.net
>
>
>
>Yahoo! Groups Sponsor
><http://rd.yahoo.com/SIG=12cs369sj/M=259395.3614674.4902533.1261774/D=egroupweb/S=1705007183:HM/EXP=1068884363/A=1524963/R=0/*http://hits.411web.com/cgi-bin/autoredir?camp=556&lineid=3614674&prop=egroupweb&pos=HM>12fdd020.jpg
>
>12fdd0a2.jpg
>
>To unsubscribe from this group, send an email to:
>firebird-php-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to the
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.