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]
|