Hi can someone help debug this?
Currently my script throws this error "Parse error: syntax error, unexpected '=' in includes/common.inc(1695) : eval()'d code on line 38" and I've narrowed it down to this SQL statement. It appears that counting results rows in Drupal isn't as straight forward as I'd hoped.
$sql_checkIP = "SELECT COUNT(*)
FROM (SELECT DISTINCT v.hostname
FROM {pollfield_votes} v
WHERE v.hostname = '%s' AND v.nid =%d)";
$result0 = db_result(db_query($sql_checkIP, $hostname, $nid));
Thanks for any help :)