You are here: Re: How to check for an existing column in an table? « PHP Programming Language « IT news, forums, messages
Re: How to check for an existing column in an table?

Posted by yonthebeach@googlemail.com on 06/19/06 20:15

thank you very much bob!

greetz yavuz

Bob Stearns wrote:
> yonthebeach@googlemail.com wrote:
> > Hi,
> >
> > how can i check with php a table for a column. if it doesn't exist i
> > want to create it.
> >
> > thanks
> > yavuz
> >
> Easy:
> $res = odbc_exec($dbconnection,"SELECT * FROM table");
> $x = odbc_fetch_array)$res;
> if(!array_key_exists($x,"columnname") {
> <create columnnname in table>
> }

 

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

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