Re: mySql updating numbers



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@xxxxxxxxxxx> wrote in message
news:1127142562.098174.249550@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> 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.
>


.



Relevant Pages

  • RE: Email from Access
    ... "Mikey" wrote: ... > I have a contacts database which contains an email field. ... > field, and have an outlook email window open, with the ... Prev by Date: ...
    (microsoft.public.access.macros)
  • Need a global global field
    ... I want a global field that is the same for every user ... a large database. ... Kevin ... Prev by Date: ...
    (comp.databases.filemaker)
  • Re: Should my design be changed??
    ... Thanks Roger and Kevin for re-inforcing my suggestion. ... >> You make a change, and the next time each user opens it, they ... >>> all access this master database through a shortcut to a macro that just ... >>> Please advise with any recommendations. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Database access on a local machine
    ... Kevin, thanks for your patience with this one. ... I have not created any new stored procedures in the SQL Server database, although there are 30 that were already put there by the server when the database was created. ... the error message says "The specified procedure could not be found." ...
    (microsoft.public.frontpage.programming)
  • Re: leading spaces
    ... Kevin, I checked the database and everything looks fine. ... message I'm getting from the empty address field. ... Microsoft VBScript runtime error '800a000d' ...
    (microsoft.public.frontpage.programming)