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

Perl: How to Connect to mysql

Perl: How to Connect to mysql

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

Users who found this page were searching for:

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

No comments yet.

Leave a Comment