Michael Stassen wrote:



Amer Neely wrote:

Amer Neely wrote:

Brian Reichert wrote:

On Sat, Sep 04, 2004 at 02:40:20PM -0400, Amer Neely wrote:

My question is, in my admin script I deleted a record, but it still shows up using the other script. The admin script shows 102 records and the other shows 103. The record does show up in the 'public' script, so it's not just a mis-count. How is this possible? Is there a step I'm missing because I'm using 2 different scripts to access the same tables? That doesn't make sense. Can someone shed some light on what might be happening here?


Web caching? Flushing tables after your delete?


I just checked the database with phpMyAdmin. The record I deleted through my script is still there, but doesn't show up in a query for it. Tried to execute the 'FLUSH TABLES' query with phpMyAdmin, but got this instead:

#1227 - Access denied. You need the RELOAD privilege for this operation

So I'll need to see about getting RELOAD privilege I guess. Thanks for pointing in the right direction.


Michael Stassen wrote:

You can eliminate webserver/browser/caching issues from consideration by trying your query directly in the mysql client.

Are you using InnoDB and transactions? It sounds to me as if you deleted the record but have not yet committed. In that case, the deleted record will be gone for the client which started the transaction, but will still be available to all other clients until you commit.

Michael


No, I don't use InnoDB or transactions. I'm waiting to hear back from my


Aside from the symptom match, I asked because you mentioned "buttons to commit the action" in your first message.

host. I don't have access to the mysql client on the server. I'm pretty sure it's the RELOAD privilege I'm missing. Thanks though.


I'm pretty sure it's not. With a properly functioning mysql server, you need neither FLUSH TABLES nor the RELOAD privilege to delete a row from a table. See the manual for a description of FLUSH TABLES <http://dev.mysql.com/doc/mysql/en/FLUSH.html>.

I did and imagine my surprise when I read this:

"You should use the FLUSH statement if you want to clear some of the internal caches MySQL uses. To execute FLUSH, you must have the RELOAD privilege."

There is a subtle difference between actually deleting a row and whether MySQL shows it to you or not. Even though the row is still in the table, a query from the perl script that I used to 'delete' it didn't return it. It had been flagged as deleted for that session, but that is not the same as being deleted. Which is why it was visible from another script.

At this point, we don't have enough information to do more than guess. If you're sure it's neither browser caching nor a transaction, that leaves something in your scripts, so you should give us some details. What scripting language do you use? What do your queries look like? What results do you get. And what do you mean by "I just checked the database with phpMyAdmin. The record I deleted through my script is still there,
but doesn't show up in a query for it."?


Michael





--
/* All outgoing email scanned by AVG Antivirus */
Amer Neely, Softouch Information Services
Home of Spam Catcher & North Bay Information Technology Networking Group
W: www.softouch.on.ca
E: [EMAIL PROTECTED]
Perl | PHP | MySQL | CGI programming for all data entry forms.
"We make web sites work!"

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to