Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

 $addbh = DBI->connect('dbi:AnyData(RaiseError=>1):');
$addbh->do("CREATE TABLE test (column1 varchar,column2 varchar,column3
varchar,column4 varchar)");
$addbh->do("INSERT INTO test VALUES ('one','','three','four')");
$addbh->do("INSERT INTO test VALUES ('five','six','seven','')");

 $query="select * from test";
 $sth = $addbh->prepare($query);
  while($data=$sth->fetchrow_hashref()) {
       foreach $c (sort(keys(%$data))) {
          print "$c = $data->\n";

This code snippet generates the following output. Note that having a
null value in column2 munges the data in columns 2,3,4. However, if
the null is in the last column in a row, all is well.
Is this a bug, or have I just completely overlooked something?


column1 = one
column2 = '?1?three?2?four'
column3 =
column4 =
column1 = five
column2 = six
column3 = seven
column4 =


Site Timeline