If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Need Query please!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-19-11, 20:40
arunknownz arunknownz is offline
Registered User
 
Join Date: May 2011
Posts: 1
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 22:03.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On