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.

Yes, sorry. In my scripts.

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>.

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


OK, obviously a bit more background seems to be in order.

My site is hosted but I am not the administrator. I have 2 perl scripts, behaving as already described. I also have phpMyAdmin access to my databases. I don't have command line access to the server.

I don't use InnoDB or transactions.

What is happening is that I delete a record with one script, but it still shows up when the db is queried by the other script. It DOESN'T show up in the one I used to delete the record.

phpMyAdmin shows me that the record still exists in the db. My scripts are not the problem. When I tried to execute a FLUSH TABLES command with phpMyAdmin, that's when I get the error about not having RELOAD privilege. Sounds pretty clear to me.

So tell me, is this a 'properly functioning mysql server'?

--
/* 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