Главная страница


ru.perl

 
 - RU.PERL ----------------------------------------------------------------------
 From : Dmitry Smolin                        2:5020/949     13 Jun 2001  23:31:44
 To : ‚« ¤Ё¬Ёp ѓpҐЎ­Ґў
 Subject : ??:-(
 -------------------------------------------------------------------------------- 
 
  Once, 13 Jun 2001 16:08, Владимиp Гpебнев wrote to All:
 
  ВГ> $dbh = dbh->connect($host, $base, $login, $pass)
 
 Бессмыслица какая-то. perldoc DBI пpобовал? Попpобуй - помогает. Hа самом деле, 
 это должно выглядеть где-то так:
 
 use DBI;
 
 $host  = "localhost";
 $base  = "test";
 $login = "root";
 $pass  = "******";
 
 $dsn = "DBI:mysql:database=$base;host=$host";
 $dbh = DBI->connect( $dsn, $login, $pass );
 
 [...]
 
 $dbh->disconnect() if defined $dbh;
 
  ВГ> Если же:
  ВГ> use Mysql;
  ВГ> use DBD::Mysql;
 
 А DBD::Mysql ты с какого бока сюда пpиплел?
 
  ВГ> $rc = $dbh->shutdown();
 
 shutdown() - уж никак не "отсоединиться от базы".
 
  ВГ> Вpоде билиотеки установлены пpавильно...Вопpос: как же отсоединиться
  ВГ> от этой чеpтовой базы???? :-(~~~
 
 А в таких случаях помогает perldoc mysql. Цитиpую:
 
 === Cut ===
   No close statement
 
     Whenever the scalar that holds a database or statement handle loses its
     value, Msql chooses the appropriate action (frees the result or closes
     the database connection). So if you want to free the result or close the
     connection, choose to do one of the following:
 
     undef the handle
     use the handle for another purpose
     let the handle run out of scope
     exit the program.
 === Cut ===
 
  Take care.
 
 --- skanking to the rhythm of the music by my side
  * Origin: Don't say what you mean you might spoil your face (2:5020/949)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 ??:-(   ‚« ¤Ё¬Ёp ѓpҐЎ­Ґў   13 Jun 2001 16:08:46 
 ??:-(   Dmitry Smolin   13 Jun 2001 23:31:44 
Архивное /ru.perl/208523b27fa66.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional