Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Perl: How to Connect to mysql

Perl: How to Connect to mysql
{filelink=14656}

#!/perl/bin
use DBI;
use strict;
my $db_connect = DBI->connect('dbi:mysql:MyDatabase',
								'username',
								'password',
								 { PrintError => 0, RaiseError => 1, AutoCommit => 0 });
my $query="SELECT * FROM table";
my $statement = $db_connect->prepare($query);
$statement->execute
	|| die "Query Failed";
while (my @row=$statement->fetchrow_array)
{
   print "@row ";
}
$db_connect->disconnect();

Users who found this page were searching for:

  • java match all numbers from string
  • how to read email headers in java
  • Python Get Username
  • python return tuple
  • python simple user interface
  • python upload html file
  • +mssql insert python
  • python tkinter handlers
  • python csv file sql query

No comments yet.

Leave a Comment