topical media & game development

talk show tell print

mashup-gmaps-ch11-01dbcreate.pl / pl



  #!/usr/bin/perl
  
  use DBI;
  
  my dbh = DBI->connect( 'dbi:mysql:database=mapsbookex;host=db.maps.mcslp.com',
                          'mapsbookex',
                          'examples',
                          );
  
  if (defined(dbh))
  {
      dbh->do('create table ch10 (entityid int auto_increment not null primary key, ' .
               'lat float,lng float,' .
               'type varchar(80),title varchar(80),' .
               'tel varchar(80),adda varchar(80),addb varchar(80))');
  }
  else
  {
      die "Couldn't open connection to database\n";
  }
  
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.