Re: [Jason] Need to increment clicks counter
Thanks so much for you quick response. Although the example you gave me did not work as is, I got enough of an understanding of what needed to happen to get it to work another way. Code for clickCount.php:
---------------------------------------------------------
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
require_once "/hsphere/local/home/rconring/conring.com/cmsAdmin/lib/viewer_functions.php";
list($linkRecords, $linksMetaData) = getRecords(array(
'tableName' => 'links',
'loadUploads' => '0',
'allowSearch' => '0',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$linkRecord = @$linkRecords[0];
// $link = mysql_get("links", intval(@$_REQUEST['recordNum']));
incrementCounterField('links', 'clicks', $linkRecord['num']);
redirectBrowserToURL($linkRecord['url']);
exit
?>
----------------------------------------------------
I kept getting an error on the mysql_get line so I got the record as I would on a detail page. Can you tell me why I got the error and if any, what disadvantage my method has? Error was unexpected ";" in line ...... and I could not tell why.
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987