Hi all,
Any of you come across this before? I have but can’t remember what the problem was and I can’t find any post on here about it…
I have this in a page where youtube videos are embedded and I’m just counting the video views to later display in a “most popular videos” list… Althought it isn’t a major problem, this count doesn’t work as I hoped it would.
It should take the current “view cout” add 1 to it and update the Db. Well, it pulls the “view count” properly but the increments are to say the least, random :ohh:
Any suggestions/better ways?
Merci
{if:elseif segment_2 !=''}
<h2>{title}</h2>
<p> <? // This count views on videos<br />
$entry_id = "{entry_id}";<br />
$view_count = "{hmg_view_count}";<br />
$query = "UPDATE x_weblog_data SET field_id_8 = $view_count + 1 WHERE entry_id = $entry_id";<br />
$result = mysql_query($query); <br />
?><br />
{/if}