How and when mysql performs a delete depends on several things including,
the type of table that is used, configuration parameters and the wording of
the delete query.  There are some situations in which deletes are put into a
que and performed only after there are no connections to the table.  Since I
am not familiar with your set up or code, you will need to read the mysql
docs to determine if this is in fact the situation you find yourself in.

Fred

Avi Schwartz <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have a strange problem.  I have a page that displays a list of records.
> When the user clicks on the delete link by one of the records, a php
script
> is taking care to delete that specific record and then redirects back to
> the record list.
>
> I use PEAR::DB with MySQL.
>
> When I use header("Location: ...") to redirect the user back to the record
> list page, many times the screen still displays the old list and I have to
> refresh the page so see that the record was deleted.  At first I thought
> that the page is redisplayed from the cache so I added the appropriate
meta
> tags to make sure that the page will not be cached by the browser.  Since
> sometimes it worked and sometimes it didn't, I started suspecting the the
> problem may be with the fact that the database (mysql) may have not
removed
> the record yet by the time the record list is redisplayed.  I decided to
> try to use the http-equiv="refresh" meta tag with a delay of 1 second, and
> suddenly the problem has disappeared.  I also worked by setting the delay
> to 0.
>
> Does the above suspicion I have even make sense?  Why would mysql not
> complete the delete when the delete is executed?
>
> Avi
> --
> Avi Schwartz
> [EMAIL PROTECTED]
>
> "I have to share the credit. I invented it, but Bill made it
> famous." - IBM engineer Dave Bradley describing the
> control-alt-delete reboot sequence



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to