Permalink
Browse files

Basic framework for updating views per charity on drupal field

  • Loading branch information...
1 parent d57067b commit a6195af366891eb2c713699b8d6159ee954ff795 @zachgk committed May 14, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 Server Code/ad.php
View
@@ -14,7 +14,8 @@
window.addEventListener('load',pw_load,false);}})();
</script>
-<?php switch($_GET["ad_number"]) {
+<?php
+switch($_GET["ad_number"]) {
case 1:
print '<div id="pw_adbox_60904_4_0"></div>';
break;
@@ -31,4 +32,11 @@
print '<div id="pw_adbox_63814_4_0"></div>';
break;
}
+
+if($charity = $_GET["charity"]){
+ $add_view_query = "UPDATE dr_field_data_field_charity_views SET field_charity_views_value=field_charity_views_value+1 WHERE entity_id=$charity";
+ //$add_view_result = mysqli_query(/*database connect variable*/,$add_view_query);
+ //Should I be changing dr_field_revision_field_charity_views instead?
+}
+
?>

0 comments on commit a6195af

Please sign in to comment.