Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

count

Status
Not open for further replies.

JamesGMills

Programmer
Joined
Aug 15, 2005
Messages
157
Location
GB
Hi everyone,

I have a table full of blog posts. I dont want to create a table just to log hits so i thought i would add a column to that table called 'views'.

I want to create a SQL UPDATE to count++ this, can it be done just int eh sql?

James

------------------------
 
Hi

Like this ?
Code:
[b]update[/b] [green][i]thetable[/i][/green] [b]set[/b] view=view+1 [b]where[/b] [green][i]theid[/i][/green]=whatever;

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top