0

Hi, I'm trying to code a league table system and I was wondering if there's an easy way of doing this:

$result=mysql_query("UPDATE Championship SET played="++1" WHERE team_name='$home_team'") or die(mysql_error());

The problem lies in the played="++1" part, I can set it to be any integer, but that's not much use, I need it to add 1 to however many games the team have already played. Is there any syntax which would allow me to do this?
Thanks in advance,
Darren.

1
Contributor
2
Replies
3
Views
7 Years
Discussion Span
Last Post by dreinzy
0

I've tried played= played +1 as suggested somewhere else. Didn't work.

0

No, wait, played=played+1 DID work, there was just a " astray.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.