SearchSearch   

Count deleted records

 
   Webmaster Forums (Home) -> PHP MySQL RSS
Next:  Stale data when requerying MySQL w/PHP?  
Author Message
name

External


Since: Nov 14, 2006
Posts: 16



(Msg. 1) Posted: Wed Oct 01, 2008 11:14 am
Post subject: Count deleted records
Archived from groups: alt>php>sql (more info?)

Hi,
Using MySQL
Is there an easy solution to count deleted records in a table?
For instance: I want to delete all records "Jones" in the table "names"
$query = "DELETE FROM names " ."WHERE host LIKE '$keyword[$i]'";
echo "$count records deleted";

Help much appreciated
Back to top
Captain Paralytic

External


Since: Apr 24, 2007
Posts: 49



(Msg. 2) Posted: Wed Oct 01, 2008 11:14 am
Post subject: Re: Count deleted records
Archived from groups: per prev. post (more info?)

On 1 Oct, 10:14, "H@C0" <n... DeleteThis @fish.net> wrote:
> Hi,
> Using MySQL
> Is there an easy solution to count deleted records in a table?
> For instance: I want to delete all records "Jones" in the table "names"
> $query = "DELETE  FROM names " ."WHERE host LIKE '$keyword[$i]'";
> echo "$count records deleted";
>
> Help much appreciated

http://uk2.php.net/function.mysql-affected-rows
Back to top
Captain Paralytic

External


Since: Apr 24, 2007
Posts: 49



(Msg. 3) Posted: Wed Oct 01, 2008 11:14 am
Post subject: Re: Count deleted records
Archived from groups: per prev. post (more info?)

On 1 Oct, 11:58, "H@C0" <n....TakeThisOut@fish.net> wrote:
> >http://uk2.php.net/function.mysql-affected-rows
>
> Thanks for the link. It was helpfull.

That's why I posted it.
Back to top
name

External


Since: Nov 14, 2006
Posts: 16



(Msg. 4) Posted: Wed Oct 01, 2008 12:58 pm
Post subject: Count deleted records
Archived from groups: per prev. post (more info?)

>http://uk2.php.net/function.mysql-affected-rows

Thanks for the link. It was helpfull.
Back to top
Display posts from previous:   
       Webmaster Forums (Home) -> PHP MySQL
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum