sql + update

E

elgo

sorry ich hab schon wieder ne frage

PHP:
$query = "UPDATE forum_topic SET topic_views='topic_views+1' WHERE topic_id='" . $tid . "'";

das funktioniert so nicht

ich bin mir aber sicher das es irgendwie so ähnlich geht
oder muss ich die topic_view erst nochmal in einer anderen schleife auslesen um sie dann um + 1 updaten zu können
 
Hi,

jup, fast ;)

$query = "UPDATE forum_topic SET topic_views=topic_views+1 WHERE topic_id='" . $tid . "'";

... topic_views ist kein String....
 
Zurück