Article View: adobe.golive.dynamic.content
Article #130PHP Click Count question
From: Jeremy_M._Cox
Date: Fri, 13 Aug 2004 06:24
Date: Fri, 13 Aug 2004 06:24
15 lines
1687 bytes
1687 bytes
In theory this sounds like it would work but clearly I am doing something wrong.
I want to keep track of how many times a story is viewed. I have a table called stories. Its primary key is a column called story_ID and the counts would be kept track in a column called story views.
In order to get to a page I am using a pageParameter called showme.
At the top of the story page (all stories are viewed on this page when clicked) I added a mysql query something like this
// include ("../config/include/db.php");
// $query = "update stories set story_views = story_views + 1 where story_ID = '. pageParameter("showme" "-1") . '";
// $results = mysql_query($query);
The page paremeter sends the story_ID from the clicked headline on the previous page. In theory I thougtht this would work but to no avail. I get parsing errors and mysql_fetch_array errors
I checked online for help but I found programs for counting external links and such. In the forum all I found was a click counter in ASP. Can anyone nudge me in the right direction.
Technical Details
Message-ID:
<3bb5761f.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!zen.net.uk!dedekind.zen.co.uk!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Thread: 11ffd2,c02a081cb0c46677,start X-Google-Attributes: gid11ffd2,public X-Google-Language: ENGLISH,ASCII-7-bit From: Jeremy_M._Cox@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!zen.net.uk!dedekind.zen.co.uk!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.golive.dynamic.content Subject: PHP Click Count question Message-ID: <3bb5761f.-1@webx.la2eafNXanI> Date: Thu, 12 Aug 2004 23:24:57 -0700 Lines: 24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit