Results 1 to 7 of 7

Thread: MySQL with Perl

  1. #1

    Thread Starter
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666

    MySQL with Perl

    How do i go about accessing/creating a MySQL database from perl. I'm running Solaris 2 (UNIX).
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  2. #2
    scoutt
    Guest
    good luck, if you find out let me know as I am wondering the samething. I have not seen any programs that do this.

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    DBI:: is what you want

    A quick search revealed: http://www.google.com/search?sourcei...nt&q=DBI+mysql
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    scoutt
    Guest
    ya that is what I just found out. also cgi.pm is/was used in some cases. I also found out tha tis is pretty much like php
    PHP Code:
    my $data_source "DBI:mysql:$database:$dbserver";
        
    $dbh DBI->connect($data_source$dbuser$dbpass)
          || &
    error("Can't connect to $data_source$DBI::errstr.", $0); 
    actually they use DBIBD

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    DBD is the internal driver that supports DBI (database interface) - going along with the "all software problems can be simplified by adding an extra layer of indirection"

    CGI.pm is just for the CGI part but I never used it - always used my 5-line parser code and that was all
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    scoutt
    Guest
    thanks Mike, I never used DBI or any form of it.

  7. #7

    Thread Starter
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    Okay, after a little research on CPAN, i've found out the following:

    1. I will use the DBI module to connect to the database
    2. I will use the DBD::MySQL driver included in the "msql mysql" package avalible through the DBI help files


    Thanks to all that helped, and i hope this will help anyone that needs it
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width