RegEx - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

RegEx

AboveyouAboveyou Posts: 1Member
Hi,

i wrote a phone book in perl (gui-tk) all the users details are located in MS access database, i need a few regex "pointers" on how to do a search on access database for example:

*.user name "john dow" (located in a single table) i want it to display the entire row of user details (username,mail etc...) by just type "j" or "on" or just "john" or "dow" etc...


Comments

  • leeb003leeb003 Posts: 12Member
    use DBI;
    $db_handle = DBI->connect('dbi:ODBC:driver=microsoft access driver (*.mdb);dbq=C:path to access.mdb');

    $get = "SELECT * FROM default_table WHERE user_name = 'jon'";

    $statement = $db_handle->prepare($get)
    or die "couldn't prepare query '$get': $DBI::errstr
    ";

    $statement->execute()
    or die "Couldn't execute query '$sql': $DBI::errstr
    ";

    ...haven't tested but something like this should work.
Sign In or Register to comment.