Jump to content

[SOLVED] MySQL join isue


brocky

Recommended Posts

I have a problem with my database. I have two tables which i want to join together. However these two tables have nothing in common. I want to match up how much came from cache in log_squid to all the other data in log_dg. The wheref fields are sometimes the same and other times different.

 

I am usually pretty good at working these things out but this one has me stumped. I know there is a MySQL LIKE statement but couldn't get that to work. Any ideas would be great.

 

Thanks

 

(See the attached files for some sample data)

 

[attachment deleted by admin]

Link to comment
Share on other sites

ok i have now got them both with a common feild however when i do a join i end up with the following output:

timewheref cachetimefromfhitmissssizehowwheref mimetypeurl

1218001890http://adserver2.synnex.com.au/openads/adjs.php?22041218001890192.168.100.10ALLOWED2204GEThttp://adserver2.synnex.com.au/openads/adjs.php?-http://adserver2.synnex.com.au/openads/adjs.php?n=...

1218001890http://adserver2.synnex.com.au/openads/adjs.php?19821218001890192.168.100.10ALLOWED2204GEThttp://adserver2.synnex.com.au/openads/adjs.php?-http://adserver2.synnex.com.au/openads/adjs.php?n=...

1218001890http://adserver2.synnex.com.au/openads/adjs.php?22041218001890192.168.100.10ALLOWED1982GEThttp://adserver2.synnex.com.au/openads/adjs.php?-http://adserver2.synnex.com.au/openads/adjs.php?n=...

1218001890http://adserver2.synnex.com.au/openads/adjs.php?19821218001890192.168.100.10ALLOWED1982GEThttp://adserver2.synnex.com.au/openads/adjs.php?-http://adserver2.synnex.com.au/openads/adjs.php?n=...

 

Its doubling up on them in some spots because none of the data is unique. Does anyone no how to get it to only dispaly it once

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.