You are here: Re: Retrieve fields with similar values from 2 tables? « PHP Programming Language « IT news, forums, messages
Re: Retrieve fields with similar values from 2 tables?

Posted by no.mail.pls on 03/21/06 06:34

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:FOqdnaQ40Ly9L4fZRVn-rw@comcast.com...
> no.mail.pls wrote:
>> Hiya,
>>
>> How do i retreive fields with similar values from 2 tables?
>>
>> I tried to use
>> (1) "SELECT * FROM $table1 as o , $table2 as p WHERE o.name like
>> '%p.name%'";
>> but it retrieves nothing at all.
>>
>> (2) "SELECT * FROM $table1 as o , $table2 as p WHERE o.name like p.name";
>> will retrieve exact matches only, but this is not what i want.
>>
>> (3) SELECT * FROM $table1 as o , $table2 as p WHERE o.name LIKE
>> CONCAT('%',
>> p.name, '%');
>> will retrieve exact matches only.
>>
>> Any advice will be appreciated.
>>
>> PostScript: i posted the above in mysql groups, but problem remains, so
>> am trying my luck here.
>>
>> TIA
> You've also asked this in (at least) comp.databases.mysql and
> alt.comp.databases.mysql (where is is much more appropriate).
>
> And please learn how to cross-post.

Pethaps to x-post or not is a choice between the devil and the deep blue
sea, even though not all of us believe in devils, and some of us love the
deep blue sea.

Tiptoeing gently among the mines in Usenet can be a tricky bizness.

cheers

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация