i'm a bit unfamiliar with the UPDATE function as opposed to the SELECT one, so i'm stumped as to why this isn't working.Code:$pop=$row[pop]; $p=1; $popp=($pop+$p); mysql_query("UPDATE fragrances SET pop = '$popp' WHERE sku=$sku");
the idea behind this code is that when the page is loaded, it automatically updates the set of "pop" by 1. this works fine the first time ie. from "0" to "1".
but now when i refresh a page or go back at a later date the pages that have the pop value of "1" aren't moving up to "2".
i'm stumped! any ideas?



Reply With Quote

Bookmarks