The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
NAME
    SQL::QueryBuilder::Simple - Generates simple SQL SELECT queries

REQUIREMENTS
    This module is written for and tested on Perl 5.6.0.

    It uses only standard modules.

  Installation

    Installation is pretty standard:

      perl Makefile.PL
      make
      make test
      make install

SYNOPSIS
      use SQL::QueryBuilder::Simple;

      my $query = SQL::QueryBuilder::Simple->new(
        table  => "MYTABLE",            # from table MYTABLE
        fields => [ qw( FLD1 FLD2 ) ],  # select fields FLD1, FLD2
        ne     => { FLD1 => -1 },       # where FLD1 not equal to -1
      );

      print $query->sql; # SELECT FLD1, FLD2 FROM MYTABLE WHERE FLD1<>?

      use DBI;

      my $dbh = DBI->connect( ... ) or die;
      my $sth = $dbh->prepare( $query->sql ) or die;

      $sth->execute( $query->bindings ) or die;

DESCRIPTION
    This module generates simple SQL select statements and manages binding
    parameters, to simplify generating dynamic queries.

    This module will only generate SQL code. It does not validate the code,
    nor does it check against any database to see if table or field names
    are valid.

    See the module's POD for more detailed information.

SEE ALSO
    There are similar modules available on CPAN. Many of these modules
    incorporate database connections and execute the queries, which in some
    cases is too much functionality. However, these may be more suited to
    your needs. Some of them are listed below:

      DBIx::SearchBuilder
      Relations::Query
      Text::Query::SQL

AUTHOR
    Robert Rothenberg <rrwo@cpan.org>

LICENSE
    Copyright (c) 2001 Robert Rothenberg. All rights reserved. This program
    is free software; you can redistribute it and/or modify it under the
    same terms as Perl itself.