Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to alter table through php script ???

1 view
Skip to first unread message

sznury

unread,
Apr 2, 2005, 4:37:13 AM4/2/05
to
I wrote some script in php but it doesn't work correctly.
I get this error:
Warning: Unknown(): unsuccessful metadata update object MIASTO is in
use in Unknown on line 0
This is my (wrong)code:

$tr1 = ibase_trans();
$q4 = 'ALTER TABLE wlasciciele ADD miasto_id integer not null
references miasto(id)';
$r4 = ibase_query($dbh,$q4);
ibase_commit($tr1);
$tr1 = ibase_trans();
$q5 = 'ALTER TABLE wypadki ADD miejsce_id integer not null
references miasto(id)';
$r5 = ibase_query($dbh,$q5);
ibase_commit($tr1);

Could anyone help me? I need to write a small program (for
Interbase/Firebird ) witch will be doing:
- create new table in my current database
- add new column to some table ( alter table )
- insetr some datas to this new column (from others columns)
- delete some datas

0 new messages