Re: Interbase

From: Date: Wed, 13 Sep 2000 23:47:24 +0000
Subject: Re: Interbase
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-2633@lists.php.net to get a copy of this message
There are no error messages. But I do not see tables created by PHP in Interbase WorkBench. I created a table T1 manually, and populated the table in PHP the code is: <?php $host = "C:\\Upscene Productions\\InterBase Workbench\\Php.gdb"; $username = "sysdba"; $password = "masterkey"; $dbh = ibase_pconnect ($host, $username , $password); $stmt = 'INSERT INTO T1 (P1) VALUES (7)'; $query = ibase_prepare($stmt); $sth = ibase_execute($query); $stmt = 'INSERT INTO T1 (P1) VALUES (8)'; $query = ibase_prepare($stmt); $sth = ibase_execute($query); $stmt = 'INSERT INTO T1 (P1) VALUES (9)'; $query = ibase_prepare($stmt); $sth = ibase_execute($query); $stmt = 'SELECT * FROM T1'; $query = ibase_prepare($stmt); $sth = ibase_execute($query); while ($row = ibase_fetch_object ($sth)) { print $row->P1 . "\n"; } ibase_free_query($query); ibase_close ($dbh); ?> The output is: 7 8 9 But Interbase WorkBench shows nothing. Vice versa : if I populate the table in Interbase WorkBench, PHP shows nothing. They behaved as a different tables. Gonzalo Vera wrote: > Any error reports? You could try using \\ in the $host, like: > $host = "C:\\Upscene Productions\\InterBase Workbench\\Php.gdb"; > > Gonzalo. > > > I have local InterBase. The code below does not create a table. What I > > do wrong? > > > <?php > > $host = "C:\Upscene Productions\InterBase Workbench\Php.gdb"; > > $username = "sysdba"; > > $password = "masterkey"; > > $dbh = ibase_pconnect ($host, $username , $password); > > $stmt = 'CREATE TABLE T1 (P1 INTEGER NOT NULL PRIMARY KEY)'; > > $query = ibase_prepare($stmt); > > ibase_execute($query); > > ibase_free_query($query); > > ibase_close ($dbh); > ?>> > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#2633) next »