For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > March 2004 > updating one table with info from another









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author updating one table with info from another
Rudi Ahlers

2004-03-26, 11:12 pm

How is this done?

Cause update comments set subscriber='Y' where comments.supplier =
company.company_name doesn't work

Yet, select comments.subscriber, comments.supplier, company.company_name
where comments.supplier = company.company_name does work....

--

Kind Regards
Rudi Ahlers
+27 (82) 926 1689

For as he thinks in his heart, so he is. ... (Proverbs 23:7)


2004-03-26, 11:13 pm


"Rudi Ahlers" <Rudi@Bonzai.org.za> wrote in message
news:SuCdnc3OPas7ocLdRVn-uw@is.co.za...
> How is this done?
>
> Cause update comments set subscriber='Y' where comments.supplier =
> company.company_name doesn't work
>
> Yet, select comments.subscriber, comments.supplier, company.company_name
> where comments.supplier = company.company_name does work....
>
> --
>
> Kind Regards
> Rudi Ahlers
> +27 (82) 926 1689
>
> For as he thinks in his heart, so he is. ... (Proverbs 23:7)
>
>


where is your "from" statement ? This doesnt look correct.

I would expect something like...

update comments set subscriber='Y' from comments, company where
comments.supplier =
company.company_name


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com