Reply to Re: mySql updating numbers

Your name:

Reply:


Posted by Kevin on 09/19/05 20:27

If I understand your question, you're looking for something like this:

UPDATE `my_table` SET hits = hits + 1 WHERE record_id = '$id'

Obviously you'll need to change the variable names to match your table, but
the point is you can use a column's current value in an update.

- Kevin

"Mikey P" <phatnugs420@comcast.net> wrote in message
news:1127142562.098174.249550@f14g2000cwb.googlegroups.com...
> Hi, sorry to double post. I also need some direction on how to update
> mysql correctly when someone clicks a link it adds 1 to the database,
> if someone clicks again it ads 1 which = 2 hits. What's the proper way
> of doing this. Thanks again! - Mikey P.
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация