Results 1 to 7 of 7
  1. #1
    Pligg Donor haxhax's Avatar
    Joined
    Jan 2007
    Posts
    86
    Thanks
    Received:0
    Given: 0

    Page Statistics Module error (build 758)

    when i link url "http://XXXXXXX/module.php?module=pagestatistics", i got following error

    Statistics
    Story Title ID Views

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/waakeeco/public_html/class.template.php(674) : eval()'d code on line 19

    how can i fix it, thanks!

  2. #2
    Pligg Donor haxhax's Avatar
    Joined
    Jan 2007
    Posts
    86
    Thanks
    Received:0
    Given: 0
    anybody who can help me?

  3. #3
    Pligg Developer/Admin kbeeveer46's Avatar
    Joined
    Jun 2006
    Posts
    3,215
    Thanks
    Received:1
    Given: 0
    haxhax, there's a bug in this code. Open /modules/page_statistics/templates/page_statistics.tpl and change line 13 to this
    Code:
    $sql="select link_title,link_url,link_id,pv_page_id,count(*) views from ".table_pageviews.",".table_links." where `pv_type`='story' and link_id in(select distinct link_id from pligg_links where link_id=pv_page_id) group by `pv_page_id` order by views desc";

  4. #4
    Pligg Donor dollars5's Avatar
    Joined
    Dec 2006
    Posts
    1,960
    Thanks
    Received:0
    Given: 0
    Thanks kb for fixing - we did not forsee ".table_pageviews.",".table_links." - huh!!

  5. #5
    Pligg Developer/Admin kbeeveer46's Avatar
    Joined
    Jun 2006
    Posts
    3,215
    Thanks
    Received:1
    Given: 0
    I fixed it before putting it into the SVN but I forgot to mention it here. All you did was hard code the table prefixes to use pligg_. If people don't use that prefix then it wouldn't work for them.

    "table_links" is the equivalent of "theirprefix_links"

  6. #6
    Pligg Donor dollars5's Avatar
    Joined
    Dec 2006
    Posts
    1,960
    Thanks
    Received:0
    Given: 0
    Now we are getting more familiar with creating modules for Pligg - thanks for the headsup.

  7. #7
    Pligg Donor haxhax's Avatar
    Joined
    Jan 2007
    Posts
    86
    Thanks
    Received:0
    Given: 0
    Thanks kbeeveer46. it woks fine

Similar Threads

  1. Looking to Build Module Limiting Votes in 24 hrs?
    By Ascendancy in forum Questions & Comments
    Replies: 2
    Last Post: 07-27-2011, 08:33 AM
  2. Statistics Module
    By eiro0701 in forum Questions & Comments
    Replies: 2
    Last Post: 04-06-2009, 12:33 AM
  3. WARNING: Page Statistics Module
    By blaze in forum Questions & Comments
    Replies: 6
    Last Post: 04-22-2008, 01:29 PM
  4. Page Statistics Module v0.2
    By dollars5 in forum Questions & Comments
    Replies: 27
    Last Post: 09-14-2007, 08:07 PM
  5. Advanced Statistics with page views
    By Vinoth in forum Questions & Comments
    Replies: 13
    Last Post: 02-21-2007, 06:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Web Hosting Services by Midphase Dreamhost Web Hosting Donate to Pligg