Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.188.973 Times

DBIx::Simple::Examples 1.30

  Date Added: November 11, 2010  |  Visits: 1.145

DBIx::Simple::Examples

Report Broken Link
Printer Friendly Version


Product Homepage
Download (99 downloads)



[COPRIGHT=1] EXAMPLES General #!/usr/bin/perl -w use strict; use DBIx::Simple; # Instant database with DBD::SQLite my $db = DBIx::Simple->connect(dbi:SQLite:dbname=file.dat) or die DBIx::Simple->error; # Connecting to a MySQL database my $db = DBIx::Simple->connect( DBI:mysql:database=test, # DBI source specification test, test, # Username and password { RaiseError => 1 } # Additional options ); # Using an existing database handle my $db = DBIx::Simple->connect($dbh); # Abstracted example: $db->query($query, @variables)->what_you_want; $db->commit or die $db->error; Simple Queries $db->query(DELETE FROM foo WHERE id = ?, $id) or die $db->error; for (1..100) { $db->query( INSERT INTO randomvalues VALUES (?, ?), int rand(10), int rand(10) ) or die $db->error; } $db->query( INSERT INTO sometable VALUES (??), $first, $second, $third, $fourth, $fifth, $sixth ); # (??) is expanded to (?, ?, ?, ?, ?, ?) automatically Single row queries my ($two) = $db->query(SELECT 1 + 1)->list; my ($three, $four) = $db->query(SELECT 3, 2 + 2)->list; my ($name, $email) = $db->query( SELECT name, email FROM people WHERE email = ? LIMIT 1, $mail )->list; Or, more efficiently: $db->query(SELECT 1 + 1)->into(my $two); $db->query(SELECT 3, 2 + 2)->into(my ($three, $four)); $db->query( SELECT name, email FROM people WHERE email = ? LIMIT 1, $mail )->into(my ($name, $email));.

Requirements: No special requirements
Platforms: Linux
Keyword: Database Dbix Dbixsimpleexamples Email From Libraries Programming Query Select Where
Users rating: 0/10

License: Freeware Size: 15.36 KB
USER REVIEWS
More Reviews or Write Review


DBIX::SIMPLE::EXAMPLES RELATED
Libraries  -  Email::Store::DBI 0.254
Email::Store::DBI is a Perl module for database backend to Email::Store. SYNOPSIS use Email::Store dbi:...; This class is a subclass of Class::DBI and contains means for Email::Store-based programs to register what DSN they wish to use. It...
28.67 KB  
Libraries  -  DBIx::CGITables 0.001
DBIx::CGITables is a Perl module for easy DB access from a CGI. SYNOPSIS use DBIx::CGITables; my %parameters=(); my $query=DBIx::CGITables->new(%parameters)); $query->search_execute_and_do_everything_even_parse_the_template(); This module...
20.48 KB  
Libraries  -  DBIx::Recordset 0.26
DBIx::Recordset is a Perl extension for DBI recordsets. SYNOPSIS use DBIx::Recordset; # Setup a new object and select some recods... *set = DBIx::Recordset -> Search ({!DataSource => dbi:Oracle:...., !Table => users, $where => name = ?...
94.21 KB  
Networking  -  Set Email "From" Address 1.0
This plugin allows you to set the "From" address used in emails sent by WordPress, thus overriding the default of wordpress@yourdomain.com.The resulting "From" in emails sent by WordPress will still display a name that depends on the context in...
10 KB  
Libraries  -  Search::Tools::Keywords 0.06
Search::Tools::Keywords is a Perl module to extract keywords from a search query. SYNOPSIS use Search::Tools::Keywords; use Search::Tools::RegExp; my $query = the quick fox color:brown and "lazy dog" not jumped; my $kw =...
49.15 KB  
Libraries  -  DBIx::SQLCrosstab 1.17
DBIx::SQLCrosstab Perl module creates a server-side cross tabulation from a database. SYNOPSIS use DBIx::SQLCrosstab; my $dbh=DBI->connect("dbi:driver:database" "user","password", {RaiseError=>1}) or die "error in connection $DBI::errstrn";...
72.7 KB  
Libraries  -  DBIx::Version 0.01
DBIx::Version is a Perl extension for getting database software name and version. SYNOPSIS use DBIx::Version; my $dbh = DBI->connect( ... ); my ($dbname, $dbver, $dbverfull) = DBIx::Version::Version($dbh); DBIx::Version lets you query...
3.07 KB  
Libraries  -  DBIx::HTMLinterface 0.11
DBIx::HTMLinterface is a class for creating a CGI interface to a database. SYNOPSIS use CGI; use DBI; use DBIx::HTMLinterface; $cgi = new CGI; $dbh = DBI->connect("DBI:mysql:[DATABASE]:[HOSTNAME]","[USERNAME]","[PASSWORD]") );...
16.38 KB  
Libraries  -  DBIx::Wrapper 0.24
DBIx::Wrapper library is a Perl module that serves as a wrapper around DBI, providing additional functionality and convenience methods. Whats New in This Release: - This release adds convenience methods for generating CSV, XML, and bencoded...
27.65 KB  
Libraries  -  DBIx::Timeout 1.01
DBIx::Timeout is a Perl module that provides a safe method of timing out DBI requests. The method described in the DBI documentation uses unsafe signals, which may cause memory corruption. DBIx::Timeout instead uses a separate timeout process....
6.14 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB