RE: [PHP-DB] Passing string variable to HTML TITLE tag fails within Netscape but works well within IE.

2002-10-16 Thread Howard Picken

Hi Darrian

Have had similar problems.  I got around it by
wrapping all posted variables with rawurlencode().

This replace any spaces or special characters with an nasi equiv
ie space with %20.  IE will ignore it.

GL

Howard
  -Original Message-
  From: Darrian Walker [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, 16 October 2002 1:10 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Passing string variable to HTML TITLE tag fails within
Netscape but works well within IE.


  Passing string variable to HTML TITLE tag fails within Netscape but work
  well within IE.

  I have a single page consisting of inventory items to be sold. When an
item
  is selected, it passes the product name to a DETAIL page as part of the
  TITLE tag for the DETAIL page. My problem is: Netscape does not like the
  SPACES between the text and refuses to display the DETAIL page.

  Initially, I thought there might be some way to parse the string and add
the
  ascii code for SPACE, but I wasn't sure if I was on the right track. Does
  anyone have a proven solution to this problem?

  I thought the pseudo code might look something like this:
  ?php
  function
  parse_and_change(grab_string){
  $string_holder=$grab_string;
  while stepping through the characters in this $string_holder
  { if character =   (or some other representation)
  replace it with something that doesn't
  scare netscape or title tag
  }
  return $string_holder;
  }
  ?

  ?php
  if (isset($HTTP_GET_VARS[itemname])) {
  $title = (parse_and_change($HTTP_GET_VARS[itemname] ));
  }else{
  $title=Generic Product Title;
  }
  ?

  html
  title?php echo $title ? /title
  /html







[PHP-DB] Re: [PHP] Re: Need help with HTTP-Authentication

2002-10-16 Thread dwalker

direct authentication with http headers

?php
file://if some_variable is NOT set then redirect to some other location
session_start();
  if (!isset($HTTP_GET_VARS[some_variable])) {

header( 'Location:
http://www.yourfavoritepage.com/login.php?v=nogo' );
}
?
html
!-- Your html code goes here --
/html

THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE
SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND
USE OF ADDRESSEE.  IF THE READER OF THIS MESSAGE IS NOT THE INTENDED
RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION,
DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED.
IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER
IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND
ALL COPIES AND BACKUPS THEREOF.  THANK YOU FOR YOUR COOPERATION.

-Original Message-
From: BAROILLER [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED];
[EMAIL PROTECTED] [EMAIL PROTECTED]; [EMAIL PROTECTED]
[EMAIL PROTECTED]
Date: Wednesday, October 16, 2002 2:15 AM
Subject: [PHP] Re: Need help with HTTP-Authentication


Hi,

a simple question.. :)
how do you do ?
You can use 2 methods :
with a .htaccess file on your webserver, updated with your table fields
or a direct authentification with http headers and a little bit of php...
Tell me more? may be I could help you.

Regards,
P.E. Baroiller

Davy Obdam [EMAIL PROTECTED] a écrit dans le message de news:
001901c2747e$fa0184a0$[EMAIL PROTECTED]
 Hi People,.

 I have a problem with HTTP-Authentication, i have 2 users in my
 database, and i want both to be able to login. However it works, but
 only the first user is able to login. I Use a MySQL 3.23.xx database,
 PHP 4.2.3 and Apache 2.0.40. Can anyone help me with this, any help
 would be greatly apreciated. Thanks already;-)Maybe some examples?? ;-)

 Best regards,

 Davy Obdam,
 mailto:[EMAIL PROTECTED]







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Oracle problem

2002-10-16 Thread N . A . Morgan

Hi,

Has anyone out there using PHP and Oracle come across this problem?  I have
a text area that allows free-form text that I store in a varchar2 column.  I
have problems with apostrophes in the free-form text.  When users put in an
apostrophe the SQL fails.  If I force 3 apostrophes (the usual Oracle method
of embedding apostrophes) the SQL fails.  The only way to get round the
problem is to strip them out (which I consider a work-around not a fix).

Can anyone help?

Neil Morgan
Admin Computing Section
University of Brighton
Tel: +44 (0) 1273 64 3930


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Passing string variable to HTML TITLE tag fails within Netscape but works well within IE.

2002-10-16 Thread dwalker

Just what I was looking for --  thank you.Putting together an entirely
dynamic site was difficult enough -- I need to avoid doing any EXTRA stuff
when ever possible.

Again, thanks.


THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE
SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND
USE OF ADDRESSEE.  IF THE READER OF THIS MESSAGE IS NOT THE INTENDED
RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION,
DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED.
IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER
IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND
ALL COPIES AND BACKUPS THEREOF.  THANK YOU FOR YOUR COOPERATION.

-Original Message-
From: Howard Picken [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Wednesday, October 16, 2002 1:51 AM
Subject: RE: [PHP-DB] Passing string variable to HTML TITLE tag fails within
Netscape but works well within IE.


Hi Darrian

Have had similar problems.  I got around it by
wrapping all posted variables with rawurlencode().

This replace any spaces or special characters with an nasi equiv
ie space with %20.  IE will ignore it.

GL

Howard
  -Original Message-
  From: Darrian Walker [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, 16 October 2002 1:10 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Passing string variable to HTML TITLE tag fails within
Netscape but works well within IE.


  Passing string variable to HTML TITLE tag fails within Netscape but work
  well within IE.

  I have a single page consisting of inventory items to be sold. When an
item
  is selected, it passes the product name to a DETAIL page as part of the
  TITLE tag for the DETAIL page. My problem is: Netscape does not like the
  SPACES between the text and refuses to display the DETAIL page.

  Initially, I thought there might be some way to parse the string and add
the
  ascii code for SPACE, but I wasn't sure if I was on the right track. Does
  anyone have a proven solution to this problem?

  I thought the pseudo code might look something like this:
  ?php
  function
  parse_and_change(grab_string){
  $string_holder=$grab_string;
  while stepping through the characters in this $string_holder
  { if character =   (or some other representation)
  replace it with something that doesn't
  scare netscape or title tag
  }
  return $string_holder;
  }
  ?

  ?php
  if (isset($HTTP_GET_VARS[itemname])) {
  $title = (parse_and_change($HTTP_GET_VARS[itemname] ));
  }else{
  $title=Generic Product Title;
  }
  ?

  html
  title?php echo $title ? /title
  /html








-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Oracle problem

2002-10-16 Thread Ford, Mike [LSS]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 16 October 2002 08:51
 To: [EMAIL PROTECTED]
 
 Has anyone out there using PHP and Oracle come across this 
 problem?  I have
 a text area that allows free-form text that I store in a 
 varchar2 column.  I
 have problems with apostrophes in the free-form text.

Uh-oh!  Standard can of worms no. 3!

  When 
 users put in an
 apostrophe the SQL fails.  If I force 3 apostrophes (the 

Shouldn't that be *two* apostrophes?  That's how it works here, anyway!

 usual Oracle method
 of embedding apostrophes) the SQL fails.  The only way to get 
 round the
 problem is to strip them out (which I consider a work-around 
 not a fix).

You may also want to investigate the php.ini settings magic_quotes_gpc, 
magic_quotes_runtime and magic_quotes_sybase -- although personally I prefer not to 
use these as I'm averse to magic (well, other people's, anyway!).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Passing string variable to HTML TITLE tag fails within Netscape but works well within IE.

2002-10-16 Thread Baroiller Pierre-Emmanuel

your html is wrong...
you must write :

html 
head
title?php echo $title ? /title
/head
/html

With the head tag, IE  Netscape will display your title correctly.

Regards.
P.E.
  Darrian Walker [EMAIL PROTECTED] a écrit dans le message de news: 
01c274b9$2a10a1a0$[EMAIL PROTECTED]
  Passing string variable to HTML TITLE tag fails within Netscape but work
  well within IE.

  I have a single page consisting of inventory items to be sold. When an item
  is selected, it passes the product name to a DETAIL page as part of the
  TITLE tag for the DETAIL page. My problem is: Netscape does not like the
  SPACES between the text and refuses to display the DETAIL page.

  Initially, I thought there might be some way to parse the string and add the
  ascii code for SPACE, but I wasn't sure if I was on the right track. Does
  anyone have a proven solution to this problem?

  I thought the pseudo code might look something like this:
  ?php
  function
  parse_and_change(grab_string){ 
  $string_holder=$grab_string; 
  while stepping through the characters in this $string_holder 
  { if character =   (or some other representation) 
  replace it with something that doesn't 
  scare netscape or title tag 
  } 
  return $string_holder; 
  }
  ? 

  ?php 
  if (isset($HTTP_GET_VARS[itemname])) { 
  $title = (parse_and_change($HTTP_GET_VARS[itemname] )); 
  }else{ 
  $title=Generic Product Title; 
  }
  ? 

  html 
  title?php echo $title ? /title
  /html







[PHP-DB] Postgres-Transaction-user_ignore_abort-Connection stop by the client

2002-10-16 Thread Max Buvry

Hi,

I use Postgresql 7.2.2 + php 4.2.3 and I meet a problem with
transaction and connections interruption.

The application is the famous example of the bank accounts and the money
transfers. I consider a table named DEAL where each transaction is
saved. Each tuple has an id number as key. When a tuple is added,
the maximum value of id is computed, and increased by one to
determinate the key of the next tuple.

My script php follows this steps :

ignore_user_abort(0|1)
Compute the key - v
BEGIN WORK
UPDATE the first bank account with v (credit)
sleep(300)
UPDATE the second bank account with v+1 (debit)
COMMIT WORK

While the sleep, the client may use the STOP button on his browser and
stop the connection.

I tried to execute exhaustive tests : ignore_user_abort(0) or
ignore_user_abort(1), with or without transaction, with or
without rollback.

For these tests,  I follow two steps :

1/ the client execute the first request but stops the connection
while the sleep instruction.
2/ with pgaccess, I read the content of DEAL
3/ the client executes a new request without interruption
4/ the result is displayed on the browser and checked with pgaccess


TEST 1


request 1
*

ignore_user_abort(0)
Compute the key - v=10
BEGIN WORK
UPDATE the first bank account with v as key (credit)
sleep(300)-- INTERRUPT 
UPDATE the second bank account with v+1 as key (debit)
COMMIT WORK

Result : nothing new in the database (with pgaccess)

request 2
*

ignore_user_abort(0)
Compute the key - v=10
BEGIN WORK
UPDATE the first bank account with v (credit)
UPDATE the second bank account with v+1 (debit)
COMMIT WORK

Result : the request 1 is executed now ! and while the key
(v=10) is the same, the request 2 fails.

Problem : why the whole first request is taking into account
now ?



TEST 2


The same by removing BEGIN and COMMIT.

The first request : only the first update (before the stop)
is executed

The second request is executed correctly.

Problem : ignore_user_abort is called with 0, so why the execution
of the script for the first request doesn't continue ?


TEST 3 and 4


The tests 3 and 4 reproduce the test 1 and 2 by using
ignore_user_abort(1).
The results are absolutely the same !


TEST 5 and 6


The tests 5 and 6 reproduce the test 1 and 2 by using ROLLBACK
if ( connection_aborted() ) { ROLLBACK WORK; exit } is added
after the sleep.
The results are absolutely the same again !


I find the results very strange, isn't it.

In advance, thanks for your help.


mb

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Oracle problem

2002-10-16 Thread .: B i g D o g :.

You might want to play with the magic_qoutes...


On Wed, 2002-10-16 at 01:50, [EMAIL PROTECTED] wrote:
 Hi,
 
 Has anyone out there using PHP and Oracle come across this problem?  I have
 a text area that allows free-form text that I store in a varchar2 column.  I
 have problems with apostrophes in the free-form text.  When users put in an
 apostrophe the SQL fails.  If I force 3 apostrophes (the usual Oracle method
 of embedding apostrophes) the SQL fails.  The only way to get round the
 problem is to strip them out (which I consider a work-around not a fix).
 
 Can anyone help?
 
 Neil Morgan
 Admin Computing Section
 University of Brighton
 Tel: +44 (0) 1273 64 3930
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 
.: B i g D o g :.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Getting valie between two fields? (mysql)

2002-10-16 Thread 1LT John W. Holmes

 I have a table something like this:
 __
 | id | number |
 | 1 |   1 |
 | 2 |  23|
 | 3 |  59|
 | 4 | 103   |
 
 If I have a number, say 30, I need to get the last number it's above - 
 in this case id 2.  Any ideas?

$number = 30;
SELECT id FROM table WHERE number  $number ORDER BY number DESC LIMIT 1;

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Getting valie between two fields? (mysql)

2002-10-16 Thread Ryan Jameson (USA)

select number from table where number  30 
order by number desc 
limit 1

 Ryan

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 11:08 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Getting valie between two fields? (mysql)


I have a table something like this:
__
| id | number |
| 1 |   1 |
| 2 |  23|
| 3 |  59|
| 4 | 103   |

If I have a number, say 30, I need to get the last number it's above - 
in this case id 2.  Any ideas?

-- 
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Getting valie between two fields? (mysql)

2002-10-16 Thread Ryan Jameson (USA)

Ooopss 2 answers is better than none. :-) ...

James, can I have a free database too? Just kidding... it's cool you offered.

 Ryan

-Original Message-
From: Ryan Jameson (USA) 
Sent: Wednesday, October 16, 2002 11:19 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Getting valie between two fields? (mysql)


select number from table where number  30 
order by number desc 
limit 1

 Ryan

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 11:08 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Getting valie between two fields? (mysql)


I have a table something like this:
__
| id | number |
| 1 |   1 |
| 2 |  23|
| 3 |  59|
| 4 | 103   |

If I have a number, say 30, I need to get the last number it's above - 
in this case id 2.  Any ideas?

-- 
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] desperate need for MySQL host

2002-10-16 Thread Seabird

I emailed you back.

Thank you very much for the offer. It's always good to know there are people
like you out there.

Jacco

James Mackie [EMAIL PROTECTED] wrote in message
007001c27535$171ce000$c301a8c0@emptymind">news:007001c27535$171ce000$c301a8c0@emptymind...
 If you seriously need it.. Contact me.. I will set you up.. Its always
 nice to be able to something nice for someone once in a while.. What
 goes around comes around.. :)

 James

 -Original Message-
 From: Seabird [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 15, 2002 12:47 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] desperate need for MySQL host


 Hi everyone,

 as a pilot in difficult times, I'm not in the position to pay for my
 webhosting. My solution that I have right now is less then desirable, as
 I
 have either PHP support and no ads, or PHP and MySQL (limit one DB) with
 pop-up ads.

 I'm looking for a place that is willing to provide me with minimum space
 to
 host 2 DB's with outside acces so that I can use it via my PHP provider.
 No
 Warez, No Porn, No Illegal things. Just some airline and airport Db's.

 Pls, due to my situation, don't refer me to paid hosting (no matter how
 cheap).

 I appreciate the thought you put in.

 Jacco

 Attitude is Everything!
 But Remember, Attitudes are Contagious!
 Is Yours worth Catching





 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] GOOD PEOPLE EXCIST

2002-10-16 Thread Seabird

Hi everyone,

I must say that my faith in mankind has not been disapointed. My cry for
help has been answered by several people offering to help me out. I won't
name names in here (because they might be flooded with requests) but for
those of you who helped me out:

THANK YOU!

Now that I have no more ad-pop-ups, my location is:

http://seabird.host.sk

Although not the most reliable server out there, that's what I use.

Thanx everyone,

any errors would be appreciated as report.

Jacco



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: GOOD PEOPLE EXCIST

2002-10-16 Thread Seabird

Those of you wondering:

the page does not have any content yet. the catogories work and the
guestbook is there.

That's it for now, still working on the rest.

Jacco

Seabird [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi everyone,

 I must say that my faith in mankind has not been disapointed. My cry for
 help has been answered by several people offering to help me out. I won't
 name names in here (because they might be flooded with requests) but for
 those of you who helped me out:

 THANK YOU!

 Now that I have no more ad-pop-ups, my location is:

 http://seabird.host.sk

 Although not the most reliable server out there, that's what I use.

 Thanx everyone,

 any errors would be appreciated as report.

 Jacco





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Need help with HTTP-Authentication

2002-10-16 Thread David P Lenk

Http authentication is probly  not what you would want to use.  Especially
if you want to program in timeouts, you would be better off using session
based login variables.  Cookies are even better with an encrypted pasword
that has a windows of time that you have to goto other pages to renew.

Why HTTP auth?

Is it mandatory?

I know this hasnt been any help, sorry!


Davy Obdam [EMAIL PROTECTED] wrote in message
001901c2747e$fa0184a0$960a@davy">news:001901c2747e$fa0184a0$960a@davy...
 Hi People,.

 I have a problem with HTTP-Authentication, i have 2 users in my
 database, and i want both to be able to login. However it works, but
 only the first user is able to login. I Use a MySQL 3.23.xx database,
 PHP 4.2.3 and Apache 2.0.40. Can anyone help me with this, any help
 would be greatly apreciated. Thanks already;-)Maybe some examples?? ;-)

 Best regards,

 Davy Obdam,
 mailto:[EMAIL PROTECTED]







-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Oracle problem

2002-10-16 Thread Anthony Carlos

Perhaps it would be easier to use bind variables instead. For example,

$empno = 1234;
$ename = O'Reilly;

$conn = OCILogon('scott', 'tiger');
$sql = 'INSERT INTO emp (empno, ename) VALUES (:empno, :ename)';
$stmt = OCIParse($conn, $sql);
OCIBindByName(':empno', $empno, -1);
OCIBindByName(':ename', $ename, -1);
OCIExecute($stmt);

Check out Thies' presentation:
http://conf.php.net/pres/index.php?p=slides%2Fociid=oci2

If you have questions, let us know.

-Anthony

 From: Ford, Mike   [LSS] [EMAIL PROTECTED]
 Date: Wed, 16 Oct 2002 12:14:58 +0100
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED],  [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Oracle problem
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 16 October 2002 08:51
 To: [EMAIL PROTECTED]
 
 Has anyone out there using PHP and Oracle come across this
 problem?  I have
 a text area that allows free-form text that I store in a
 varchar2 column.  I
 have problems with apostrophes in the free-form text.
 
 Uh-oh!  Standard can of worms no. 3!
 
 When 
 users put in an
 apostrophe the SQL fails.  If I force 3 apostrophes (the
 
 Shouldn't that be *two* apostrophes?  That's how it works here, anyway!
 
 usual Oracle method
 of embedding apostrophes) the SQL fails.  The only way to get
 round the
 problem is to strip them out (which I consider a work-around
 not a fix).
 
 You may also want to investigate the php.ini settings magic_quotes_gpc,
 magic_quotes_runtime and magic_quotes_sybase -- although personally I prefer
 not to use these as I'm averse to magic (well, other people's, anyway!).
 
 Cheers!
 
 Mike
 
 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Postgres-Transaction-user_ignore_abort-Connection stop by theclient

2002-10-16 Thread Yasuo Ohgaki

Max Buvry wrote:
 My script php follows this steps :
 
 ignore_user_abort(0|1)
 Compute the key - v
 BEGIN WORK
 UPDATE the first bank account with v (credit)
 sleep(300)

Make sure you have long enough timeout limit.

 UPDATE the second bank account with v+1 (debit)
 COMMIT WORK

It works for me. (at least with CVS version)

If there is uncommitted transaction, pgsql module
rollback automatically.

BTW, if you have too long timeout limit, your site
became weaker for DoS attack.

--
Yasuo Ohgaki



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php