Reply to Re: Problem with obtaining data from database (select statement)

Your name:

Reply:


Posted by Pugi! on 11/02/05 19:38

"J.O. Aho" <user@example.net> schreef in bericht
news:3ssbbuFppjkrU1@individual.net...
> Pugi! wrote:
>> "J.O. Aho" <user@example.net> schreef in bericht
>> news:3ss896Fpjj4pU1@individual.net...
>>> Pugi! wrote:
>>>> I have problem with sql statement.
>>>> I have made a address-database, problem is concerning getting
>>>> information
>>>> out of it.
>>>> Because for not everyone in my address-db I have all that information I
>>>> created the table lnk_ent_comm
>>>> When I query database for a certain entity I get all the types of how
>>>> to
>>>> communicate with him/her/it that are available. But I would also like
>>>> to
>>>> see
>>>> the types/means of communication that are missing for which there is no
>>>> entry in table lnk_ent_comm
>>>> I tried a left join from table communication on lnk_ent_comm, but that
>>>> doesn't work.
>>>
>>>
>>> Join your communication table to the lnk_ent_comm table and search for
>>> the
>>> user id_entity and where lnk_ent_comm.value is NULL.
>>
>> How do u do that? Could u give example ? Remember there are no null
>> values
>> in lnk_ent_comm.
>
> SELECT * FROM communication LEFT JOIN lnk_ent_comm ON
> communication.id = lnk_ent_comm.id_communication WHERE
> lnk_ent_comm.id_entity
> = 54 AND lnk_ent_comm IS NULL
>
>
> //Aho

If I run it as above I get error : #1054 - Unknown column 'lnk_ent_comm' in
'where clause'.
If I add a valid columname like value : query returns nothing.

Pugi!

[Back to original 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

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