468,535 Members | 1,540 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,535 developers. It's quick & easy.

Problem with prepare statement, MySQL, and PERL,

Hello,

I have a small Perl program :
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl -w
  2. use DBI;
  3. use Mysql;
  4. $host = "";
  5. $database = "";
  6. $user = "root";
  7. $password = "a1b2c3";
  8. $db = Mysql->connect ($host, $database, $user, $password) ||
  9.          die "Cannot connect to MySQL database!\n";
  10. $create = $db->prepare ("CREATE TABLE people (
  11.                                      first varchar (32) not null,
  12.                                      last varchar (32) not null ) " );
  13. $create->execute() || die "Cannot create people file!\n";
  14.  
This program can connect to MySQL fine but has an error on the prepare
statement. The error is as follows :
Expand|Select|Wrap|Line Numbers
  1. Mysql::prepare: Not defined in Mysql and not autoloadable (last try prepare) at
  2. builddb.pl line 14.
  3.  
I appreciate any help you can provide.

Akino.
Nov 13 '07 #1
1 2535
Atli
5,058 Expert 4TB
Hi Akino. Welcome to TSDN!

I think this problem has more to do with Perl than MySQL, so you may have better luck over in the Perl Forums. I will move this thread over there for you.
Nov 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Ravi | last post: by
reply views Thread by Peter Fleck | last post: by
3 posts views Thread by howachen | last post: by
3 posts views Thread by das | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.