You are here: need help with syntax « PHP SQL « IT news, forums, messages
need help with syntax

Posted by Nick Wedd on 10/06/99 11:40

I have an old table, with fields called 'description' and 'program_id'.
I have a new table, with fields called 'description' and 'id'.

For the values (10,69,39,85), I want to get the value of 'description'
from the old table record with that program_id, and stuff it into the
'description' field of the record of the new table that has that same
id.

I have been thrashing about with things like
UPDATE new_table
SET description = SELECT old_table.description
FROM old_table,new_table
WHERE new_table.id = old_table.program_id
AND old_table.program_id IN ( 10,69,39,85 );
and can find nothing that works.

Can someone please help?

Nick
--
Nick Wedd nick@maproom.co.uk

 

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

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