Advertisement
Guest User

Untitled

a guest
Oct 6th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. cpan DBD::mysql
  2.  
  3. #!/usr/bin/perl
  4.  
  5. BEGIN {
  6. use Exporter ();
  7. @ISA = "Exporter";
  8. @EXPORT =
  9. (
  10.  
  11. $DBname, $DBhost, $DBuser, $DBpassword
  12. );
  13. }
  14.  
  15.  
  16. $DBname='dbdbdbdbdb';
  17. $DBhost='127.0.0.1';
  18. $DBuser='roger';
  19. $DBpassword='xxxxxx';
  20.  
  21. #!/usr/bin/perl
  22. use DBI;
  23.  
  24. my $dbh=DBI->connect("DBI:mysql:$DBname:$DBhost",$DBuser,$DBpassword, , { RaiseError => 1 }) || die($!);
  25. $dbh->do("SET NAMES UTF8");
  26.  
  27. лалала $$params{TMPL_VARS}{MENU}=$dbh->selectall_arrayref("SELECT * FROM menu where type=$$USER_INFO{type} ", {Slice=>{}});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement