Re: Delete from mysql table is there a way to....
| From: | phplists at woodenpickle dot com | Date: | Mon, 15 Apr 2002 06:36:11 +0000 |
| Subject: | Re: Delete from mysql table is there a way to.... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18507@lists.php.net to get a copy of this message | ||
I'm not sure how to change DELETE statements in this fashion, but is there a
way maybe to run an OPTIMIZE TABLE query every so often in your PHP script..
I don't imagine you'd want it running too often since it locks the table you
run it on, but maybe on the reload of $PHP_SELF or something.. It can take a
while to run on tables with lots of data, so it may not be the best option
anyway.. Just a thought though.. Ooh, maybe a PHP script run from a cron job
every couple hours or something even??
Later,
Bob Weaver
"Jennifer Downey" <jendowney@attbi.com> wrote in message
news:20020415004700.86612.qmail@pb1.pair.com...
> Hi all,
> I'm not sure if my first post showed up so I am going to post it again and
I
> apologize if it shows up twice.
>
> Is there a way to delete a record from a mysql table without fragmenting
the
> db?
>
> Here is the query I am using and it does a horrible job. Fragment city.
>
>
>
> if ($quantity == 0)
> {
> $gone = mysql_query("DELETE FROM {$config["prefix"]}_my_items WHERE
> uid={$session["uid"]} AND id = '$item'");
> }
>
>
>
>
> Thanks
> Jennifer
>
>
> --
> The sleeper has awaken
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
>
>