Fetching Column Names

2001-05-08 Thread Sean Carte
Is it possible to fetch the names of all columns in a table? How about all tables in a database? -- My brain hurts! SeanC Mediatek Training Institute 26 Crart Ave., Berea, Durban, South Africa phone: +27 (0)31 202 1886 [EMAIL PROTECTED]

RE: Fetching Column Names

2001-05-08 Thread Sean Carte
Many thanks your helpful replies Gregory, Sikkandar, and Philip! -- SeanC

NULLs

2001-04-25 Thread Sean Carte
I'm trying (unsuccessfully) to get DBI:Pg to insert NULL values into a table. The following works in psql (and dbish): 'UPDATE null_test SET dwarf_1=NULL WHERE dwarf_2='Grumpy';' It also works in a $dbh-do() statement: But when I attempt the same with placeholders: $cursor = $dbh-prepare(

Re: NULLs

2001-04-25 Thread Sean Carte
At 5:27 pm +0200 25/4/01, Christian Hammers wrote: BTW: Is there a Difference between $dbh-errstr and $DBI::errstr ? I always used the last and it works, too. $DBI::errstr refers to the last handle used within DBI, whereas $dbh-errstr is associated with the current error flagged against the

RE: Storing and Retrieving Arrays [DBD::Pg]

2001-04-05 Thread Sean Carte
At 7:57 pm +1000 5/4/01, Neil Lunn wrote: I tend to not like this method. Certainly the duplication of field names tends to break code. If you are really looking at storing array values in a field for some purpose, you would be better off breaking up the scalar in perl. If the idea is just

Storing and Retrieving Arrays

2001-04-04 Thread Sean Carte
I've asked for help on this topic before, but received no response. Is there a better way of doing this? The following is a sample script: #!/usr/bin/perl -w # sql_arrays.pl use strict; use DBI; use Fcntl; my $uid = 'database'; my $db_name = 'test'; my $table = 'array_test1'; my $pass = '';

RE: Storing and Retrieving Arrays

2001-04-04 Thread Sean Carte
Thanks for the help Neil and Bodo. However, I do not want to store a Perl array in multiple rows, but in a single SQL array. At 7:49 pm +1000 4/4/01, Neil Lunn wrote: [...] You're right. You have misunderstood the concept [...] Maybe you want to have an array field? You would still have to