Results 1 to 1 of 1
  1. #1
    Join Date
    May 2011
    Posts
    1

    Unanswered: Need Query please!!

    hello i have 2 tables

    wp_popularpostsdata :
    postid
    day
    last_viewed
    pageviews

    and table

    wp_top_ten:
    accessedid
    postnumber
    cntaccess


    Now postid and postnumber is the same,i need a query that can replace pageviews with cntaccess.


    example:

    wp_top_ten:
    accessedid 1
    postnumber 61
    cntaccess 357

    and

    wp_popularpostsdata :
    postid 1
    day 2011-05-19 16:06:25
    last_viewed 2011-05-19 19:47:40
    pageviews 5


    i want this
    wp_popularpostsdata :
    postid 1
    day 2011-05-19 16:06:25
    last_viewed 2011-05-19 19:47:40
    pageviews 357

    can anyone help me.Thank you.It is for my website.

    solved:

    Update wp_top_ten, wp_popularpostsdata
    Set wp_popularpostsdatadata.pageviews = wp_top_ten.cntaccess
    Where wp_popularpostsdatadatacache.id = wp_top_ten.postnumber ;
    Last edited by arunknownz; 05-19-11 at 23:03.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •