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
https://forums.phpfreaks.com/topic/118386-solved-mysql-join-isue/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.