Using MySQL with PDO
|
|
|
- Georgia May
- 9 years ago
- Views:
Transcription
1 Peter Lavin revised July 25, 2011 (originally published on the MySQL site) Table of Contents Prerequisites for Using PDO... 1 Project Outline... 1 The XML Document Format... 2 Designing the Tables... 3 The Classes Table... 3 The Parent Interfaces Table... 3 The Methods Table... 3 The Parameters Table... 4 The Data Members and Constants Tables... 4 Creating the Tables... 4 Creating a PDO Connection... 4 Inserting into a Database... 7 Conclusion... 8 About the Author... 9 Prerequisites for Using PDO PDO is a PHP extension providing a data-access abstraction layer that can be used with a variety of databases. This gives you the flexibility of changing the database backend without having to alter your access methods. Even if you use MySQL exclusively, PDO can provide advantages; you can use the same data-access methods regardless of the MySQL version. This does away with the need for using the standard MySQL extension with older versions of MySQL and using the MySQLi extension for later versions. An additional advantage is the ability to use object-oriented code regardless of the version of MySQL. PDO requires the object-oriented capabilities of PHP 5, so PHP 5.0 or higher is a prerequisite. The PDO extension ships with binary versions of PHP 5.1 and 5.2 and is very simple to implement on most operating systems. Compiling PHP from source is the one sure way to customize PHP to your exact specifications and ensure that you have not only PDO but also the drivers you need. However, the package managers of most current Linux distributions make it easy to add support if it's not already there. Note Some earlier versions of Mac OS X do not include the PDO driver. The PDO extension is entirely object-oriented there is no procedural version of this extension so some knowledge of objectoriented programming is assumed. Project Outline This article examines a project that uses PDO to select from and insert into a MySQL database of PHP classes. The PDO classes are as follows: PDO the PDO connection object 1
2 PDOStatement the PDO statement object returned by the connection query method or the prepare method PDOException the PDO-specific exception object PDORow a representation of a result set row as an object All PDO classes are used with the exception of the PDORow class. XML representations of PHP classes, both internal and user-defined, are transformed into SQL INSERT statements and added to a MySQL database. This is done using the SimpleXMLElement class, one of the built-in PHP classes. Even if your grasp of XML is elementary, you'll find the SimpleXMLElement easy to understand and use. The attached compressed file contains all the code and preserves the required directory structure. Find that file here. Any userdefined classes are found in the classes directory and XML files are found in the xml directory. The PHP scripts are found at the root directory. The XML Document Format Using PHP's reflection classes you can automate the process of converting a PHP class to XML. We won't concern ourselves here with the details of how to do this; we'll review an example file in this section and include other examples in the xml directory. The reflection classes allow you to introspect your own classes or built-in classes. They are useful tools for reverse engineering code and discovering the properties of objects at runtime. More importantly perhaps, they provide a way of generating documentation from source code. If you haven't used the reflection classes before you can quickly get a sense of their capabilities by executing Reflection::export( new ReflectionClass( ClassName));. This static method of the Reflection class dumps all the methods, data members, and constants of the ReflectionClass object passed to it. The following example is an XML representation of what reflection reveals about the mysqli_sql_exception class. <?xml version="1.0"?> <classobj> <name>mysqli_sql_exception</name> <documenting_date> </documenting_date> <php_version>5.2.0</php_version> <type final="" abstract="">class</type> <origin mod_date="" num_lines="">internal</origin> <parent_class>runtimeexception</parent_class> <class_doc_comments/> <interfaces_list/> <methods_list> <method static="0" final="1" abstract="0" declaring_class="exception" priority="2"> <method_name> clone</method_name> <method_origin>internal</method_origin> <visibility>private</visibility> <method_doc_comment/> </method> <method static="0" final="0" abstract="0" declaring_class="exception" priority="2"> <method_name> construct</method_name> <method_origin>internal</method_origin> <visibility>public</visibility> <param classtype="" defaultvalue="" byreference="" isoptional="1">message</param> <param classtype="" defaultvalue="" byreference="" isoptional="1">code</param> <method_doc_comment/>... </method> </methods_list> <datamembers_list> <datamember visibility="protected" static="0" defaultvalue=""""> <datamember_name>message</datamember_name> <datamember_doc_comment/> </datamember>... </datamembers_list> <constants_list/> 2
3 </classobj> Not all methods or data members of the mysqli_sql_exception class are included but there's enough detail here to form an idea of what any XML representation of a PHP class might look like. Most of the tags and attributes are self explanatory. For example, by looking at the message data member you can readily determine that it is a protected, non-static data member with no default value. Details will become more apparent if you examine the DDL scripts used to create the database tables. Find these statements in the attached compressed file. Designing the Tables An XML class file is effectively a flat-file database. To convert this file to a relational database format requires a number of tables. These are: Classes (including interfaces) Parent interfaces Methods Method parameters Data members Constants To view the SQL needed to create these tables find the phpclasses.sql script in the scripts directory. You may want to look at this file as each of the tables is discussed in the following sections. The Classes Table The most obvious table required is the table of classes and interfaces. Find below the SQL necessary to create this table. The name field uniquely identifies each record so it could be used as a primary key but an AUTO_INCREMENT field is more convenient. Only two modifiers can be applied to a class or interface and these are final and abstract. (Static classes don't exist in PHP so there's no need for this modifier and all classes are public so there is no need for a visibility specifier.) The type and origin fields are candidates for the ENUM data type since, in both cases, there are only two options; object templates are either classes or interfaces and these are either user-defined or built-in. The last_modified,num_lines and class_doc_comment fields only apply to user-defined classes since reflection cannot capture this information when used with an internal class. The Parent Interfaces Table PHP doesn't support multiple inheritance for classes so a simple parent_class field is all that's required in the classes table. On the other hand, multiple interfaces can be implemented; hence the need for an interfaces table. This is a simple table made up of the id number of the implementing class and the interface name. The Methods Table Classes can also have any number of methods, requiring a table similar to the classes table. Like the table of classes, this table supports a method_origin field and the modifiers, final and abstract. However, methods can also be static and have a visibility modifier. The declaring_class field simply indicates whether a method is inherited as is, overridden in the child, or entirely new. 3
4 Unlike some other object-oriented languages, method overloading (in the sense of two methods with the same name but a different number or different types of parameters) is not supported in PHP. For this reason, a primary key may be created from the class id and method name. The Parameters Table Methods may have any number of parameters, hence the need for a parameters table. Parameters may have default values, may be optional, and may be passed by value or by reference. As of PHP 5.1 parameters may also be type-hinted so a class_type field is also necessary. Parameter variable names must be unique to the method and method names must be unique to a class so these two fields along with the class id uniquely identify a parameter and form the primary key. The Data Members and Constants Tables The data members table incorporates a number of fields common to the other tables and is a simpler version of the methods table. A table of constants is much simpler than the data members table and is made up of three fields only, the class_id, constant_name, and its associated value. Unlike data members, any comments that accompany constants cannot be retrieved so there is no doc_comment field for the table of constants. Creating the Tables The script file phpclasses.sql contains the DDL statements for creating the database, phpclasses, and the tables. Execute this script from the command line by navigating to the scripts directory and executing mysql -u user_name -ppassword < phpclasses.sql. Creating a PDO Connection Records are added to a database using a web form. Within this form a drop-down list box is populated with the names of classes that are not already included in the database, thereby eliminating duplicate submissions. The result is pictured below: 4
5 Figure 1. Select control The elements of the list box match the XML files on the right because no XML files have been added to the database yet. Existing XML class files are found in a directory named xml. The XML file name (excluding the xml extension) matches the corresponding PHP class name. These names are copied from the xml directory into an array using a user-defined class, DirectoryItems. This array is compared to the classes already contained in the database to create a drop-down list of classes (the <select> control in the following HTML) that aren't yet included. The code to do this follows. <form name= "select_class" action="add_record.php" method="get" style="padding:5px;"> <select style="max-width: 180px; min-width: 180px;" name = "xmlfilename" > <?php //autoload user-defined classes 5
6 function autoload($class){ include 'classes/'.$class.'.php'; include 'connection.php'; //get names of files in the xml dir $di = new DirectoryItems('xml'); $di->filter('xml'); $arr = $di->getfilearray(); //now get array of names from database try{ $db = new PDO("mysql:host=$host;dbname=$database", $username, $password);❶ $db->setattribute(pdo::attr_errmode, PDO::ERRMODE_EXCEPTION);❷ $sql = "SELECT name FROM tblclasses"; $stmt = $db->query($sql);❸ //return a simple array of all the names $arr2 = $stmt->fetchall(pdo::fetch_column, 0);❹ $db = NULL; catch(pdoexception $e){ echo $e; //select only what is not in the db $not_in_db = array_diff( $arr, $arr2); natcasesort($not_in_db); foreach($not_in_db as $v){ echo "<option>$v</option>\n";?> </select><br /><br /> <input type="submit" value="submit" /> </form> ❶ The PDO connection to the database is created by passing a Data Source Name (DSN) to the PDO constructor. A DSN is made up of the driver name followed by a colon and then driver-specific connection requirements. When using MySQL, you specify mysql: followed by the host name, database name, and database credentials. These connection parameters are contained in the connection.php file. Note If you want to execute the code you must change the username and the password contained in the connection.php file. The assumption is that you will be connecting to the database on localhost. ❷ ❸ ❹ It is also possible to connect to a database by invoking a URI. You could, for example, construct a PDO instance by pointing to a file that contains the DSN string. Do this in the following way: $db = new PDO("uri:file:///path/to/dsnfile");. The setattribute method of the PDO class lets you determine whether you want to raise errors or throw exceptions. Throwing exceptions seems to be the better choice since you can then enclose all your code in a try block and deal with errors in one place. The line $db->setattribute(pdo::attr_errmode, PDO::ERRMODE_EXCEPTION); ensures the creation of exceptions rather than errors. In order to set the error mode you need to create a connection object first. (The setattribute method performs a number of functions besides setting the error type. It can be used to force column names to upper or lower case and also to set database-specific capabilities such as MYSQL_ATTR_USE_BUFFERED_QUERY.) To execute a database query you need to use the PDO::query method to send the statement to the MySQL server and have the statement executed. For our application, we use this method to obtain a list of the rows from the class table, extracting only the name field so that we can generate a list of class names that have already been added to the database. The query method returns a PDOStatement object. There are a number of ways that we can use this object in order to determine all the classes in the database. One possibility is to use the fetch method of the PDOStatement class to return each row and then examine that row to determine whether or not the specific class is already in the database. Do this and you can use a while statement to iterate over each row returned. However, since PHP has the useful function, array-diff, for determining elements that are in one array but not another, capturing the result set as an array seems the better solution. Our query only retrieves one field so we can create a one dimensional array of all the records returned by using the fetchall method, specifying the mode as PDO::FETCH_COLUMN and the target column as the first and only column, 0. However, using fetchall with large result sets is not recommended as it may tax memory. As there only about 120 PHP classes this is not a concern here. 6
7 There is no method for explicitly closing a PDO connection but this can be done by setting the connection object to NULL. This isn't strictly necessary since PHP removes references to all objects when a script terminates. Using the appropriate method to fetch query results makes it easy to populate a drop-down list box with XML files that are not yet included in the database. The next section looks at inserting data from these XML files into a database. Inserting into a Database Selecting a class from the list box pictured in Figure 1, Select control and submitting it invokes the add_record.php script. This script contains the code that inserts records into the database tables. You might want to have a quick look at this file to get an overview of what it does. We won't discuss every line of code, we'll concentrate on the PDO code and only on methods that haven't yet been discussed. An abbreviated version of that script is shown below: try{ $dsn = "mysql:host=$host;dbname=$database, $username, $password"; $db = new PDO( $dsn); $db->setattribute(pdo::attr_errmode, PDO::ERRMODE_EXCEPTION);... $db->begintransaction();❶ $xml = new XMLFormatToSQL("xml/".$xmlfilename. '.xml', $db); $sql = $xml->createclasssql();❷ $db->exec($sql); //retrieve id $class_id = $db->lastinsertid();❸ //get array of interfaces $sql = $xml->createinterfacessql($class_id); //check before executing $db->exec($sql);... /* For constants return a two-dimensional array and use a prepared statement */ $values_array = $xml->createconstantsarray();❹ if(isset($values_array)){ $sql = "INSERT INTO tblconstants VALUES($class_id,?,? )"; $stmt = $db->prepare($sql);❺ $stmt->bindparam(1, $name, PDO::PARAM_STR);❻ $stmt->bindparam(2, $value); foreach($values_array as $arr){ list($name, $value) = $arr; $stmt->execute();❼ /*easier way to do it -- no binding foreach($values_array as $arr){ $stmt->execute($arr); */ //now can commit $db->commit();❽ $message = "Successfully added."; catch(exception $e)❾{ $message = $e->getmessage(); //a PDOException may be thrown even if db not set if(isset($db)){ $db->rollback();❿ echo $message; This script makes use of an ad hoc class, XMLFormatToSQL. This class uses a SimpleXMLElement object and its methods to generate the SQL necessary to insert records into the phpclasses database. The SimpleXML extension is enabled by default so it should be available (unless you've compiled from source and deliberately disabled it). Simply put, the XMLFormatToSQL class first creates the SQL necessary to create a record in the tblclasses table and then, if necessary, creates the related SQL statements for the other tables in the database. To examine the details of this class see the XMLFormatToSQL.php file. 7
8 ❶ ❷ ❸ ❹ ❺ ❻ ❼ ❽ ❾ ❿ The first unfamiliar method used in the add_record.php script is the begintransaction method. Using transactions means that changes can be rolled back should errors occur. (However, in some circumstances database commits occur regardless of whether the begintransaction method is used or not for example, with MySQL, when DDL statements are issued.) Creating a record in the primary table, tblclasses, is done by first creating the necessary SQL statement. This is done using the XMLFormatToSQL::createClassSQL method. Note how this method uses the PDO::quote method to quote variables. Literals may also be used (see the XMLFormatToSQL::createMethodsSQL for example) but quote has the advantage of being database-neutral. However, the recommended way for quoting and escaping special characters is to use prepared statements. You'll see how this is done shortly. The SQL statement returned by createclasssql is passed to the exec method of the PDO class. In the previous section, when issuing a SELECT statement, we used the query method of the PDO class. exec is used with SQL statements that do not return result sets; it returns the number of rows affected by the SQL statement; in this case only one record is created. The other tables in the database are dependent on the id created in the tblclasses table. To retrieve this id use the lastinsertid method exactly as you would the mysql_insert_id function. Records in the other tables are created in the came way as the record in the tblclasses table, the only difference being that an array of multiple insert statements is returned. However, the approach taken to creating the entries in the constants table differs. The createconstantsarray method of the XMLFormatToSQL class returns a two-dimensional array of the values that need inserting rather than a series of SQL statements. Using a prepared statement is the ideal solution when working with arrays of values especially when the same statement needs to be executed a number of times. Using prepared statements has a couple of advantages; it not only improves efficiency only the parameters need to be sent to the server repeatedly but it also improves security by automatically quoting variables. There is no need to use the PDO::quote method as shown earlier. To create a prepared statement, construct an SQL statement with replaceable parameters indicated by question marks. Pass this statement as a parameter to the PDO::prepare method. Use the returned PDOStatement object to bind parameters. Binding can be more or less fine-grained. You must pass a parameter identifier and the associated variable but you can also optionally pass the data type, length of the data type, and other driver-specific options. The first prepared statement parameter, the name of the constant, is always a string so it make sense to also specify the data type, PDO::PARAM_STR. The length of this parameter will vary so specifying the length doesn't make sense. The second parameter to the prepared statement is the value of the constant. This can be either an integer or a string so the data type cannot be specified when this parameter is bound. There are a number of different ways of using the PDOStatement class. You do not need to bind parameters. The code commented out in the preceding listing shows that an array of values can be passed directly to the PDOStatement::execute method, bypassing the need to bind parameters. It is also possible to use names rather than question marks as place holders for the replaceable parameters in an SQL statement. The commit method of the PDO object, ends the transaction and commits all the changes. Use of transactions means that the creation of a class record and all its related records in other tables is an atomic operation. There is only one catch block. Because a PDO exception is derived from the Exception class, this block catches any kind of exception. Happily, should you pass an incorrect DSN to the constructor, a PDOException is thrown even though no PDO object is created. (Hence the need to test the $db variable before calling the rollback method.) Using catch blocks is much less tedious than error trapping and this is a capability of PDO that you can use regardless of the MySQL server version you are using. Should an exception be thrown any changes already made can be rolled back using the rollback method. If there is a failure at any point, no records will be added to any tables. Do this and you avoid the possibility of storing incomplete information in the database. You will know that you have all the elements of a class or none of them, saving what could perhaps be a messy clean-up job if only some statements fail and others are committed. Conclusion PDO is a data-access abstraction layer providing uniform, object-oriented methods for accessing different databases or different versions of the same database. For this reason, PDO makes migrating to different databases easy; in some cases requiring only that the DSN be updated. For example, an SQLite DSN requires only the driver name and a path to the database "sqlite:mydb.sqlite". Changing this to "mysql:host=$host;dbname=$database,$username, $password" may be all you need 8
9 to do to change the database backend. However, any non-standard SQL statements also need to be changed. For instance, any statements that used the SQLite string concatenation operator,, would need to be changed to use the MySQL function, CONCAT(). Using PDO has many advantages but there are some things that it can't help you with. You can't use SQL statements that are unsupported by the underlying database. You cannot, for instance successfully issue a CREATE TRIGGER statement against a MySQL 4.1 database. About the Author Peter Lavin has been published in a number of print and online magazines. He is also the author of Object Oriented PHP, published by No Starch Press and a contributor to PHP Hacks by O'Reilly Media. Being a full-time technical writer, Peter occasionally feels the need to depart from the restrained style typical of his profession by writing articles with code snippets that use background colours other than grey. 9
PHP Data Objects Layer (PDO) Ilia Alshanetsky
PHP Data Objects Layer (PDO) Ilia Alshanetsky What is PDO Common interface to any number of database systems. Written in C, so you know it s FAST! Designed to make use of all the PHP 5.1 features to simplify
Advanced Object Oriented Database access using PDO. Marcus Börger
Advanced Object Oriented Database access using PDO Marcus Börger ApacheCon EU 2005 Marcus Börger Advanced Object Oriented Database access using PDO 2 Intro PHP and Databases PHP 5 and PDO Marcus Börger
Database Programming with PL/SQL: Learning Objectives
Database Programming with PL/SQL: Learning Objectives This course covers PL/SQL, a procedural language extension to SQL. Through an innovative project-based approach, students learn procedural logic constructs
Writing Scripts with PHP s PEAR DB Module
Writing Scripts with PHP s PEAR DB Module Paul DuBois [email protected] Document revision: 1.02 Last update: 2005-12-30 As a web programming language, one of PHP s strengths traditionally has been to make
Jet Data Manager 2012 User Guide
Jet Data Manager 2012 User Guide Welcome This documentation provides descriptions of the concepts and features of the Jet Data Manager and how to use with them. With the Jet Data Manager you can transform
database abstraction layer database abstraction layers in PHP Lukas Smith BackendMedia [email protected]
Lukas Smith database abstraction layers in PHP BackendMedia 1 Overview Introduction Motivation PDO extension PEAR::MDB2 Client API SQL syntax SQL concepts Result sets Error handling High level features
Writing MySQL Scripts with PHP and PDO
Writing MySQL Scripts with PHP and PDO Paul DuBois [email protected] Document revision: 1.02 Last update: 2013-08-11 PHP makes it easy to write scripts that access databases, enabling you to create dynamic
Advanced Tornado TWENTYONE. 21.1 Advanced Tornado. 21.2 Accessing MySQL from Python LAB
21.1 Advanced Tornado Advanced Tornado One of the main reasons we might want to use a web framework like Tornado is that they hide a lot of the boilerplate stuff that we don t really care about, like escaping
Facebook Twitter YouTube Google Plus Website Email
PHP MySQL COURSE WITH OOP COURSE COVERS: PHP MySQL OBJECT ORIENTED PROGRAMMING WITH PHP SYLLABUS PHP 1. Writing PHP scripts- Writing PHP scripts, learn about PHP code structure, how to write and execute
Real SQL Programming 1
Real 1 We have seen only how SQL is used at the generic query interface an environment where we sit at a terminal and ask queries of a database. Reality is almost always different: conventional programs
PHP Tutorial From beginner to master
PHP Tutorial From beginner to master PHP is a powerful tool for making dynamic and interactive Web pages. PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
Database Driven Websites Using PHP with Informix
Database Driven Websites Using PHP with Informix February 12, 2013 Thomas Beebe Advanced DataTools Corp ([email protected]) Tom Beebe Tom is a Senior Database Consultant and has been with Advanced
The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.
Content Introduction... 2 Data Access Server Control Panel... 2 Running the Sample Client Applications... 4 Sample Applications Code... 7 Server Side Objects... 8 Sample Usage of Server Side Objects...
Writing MySQL Scripts With Python's DB-API Interface
Writing MySQL Scripts With Python's DB-API Interface By Paul DuBois, NuSphere Corporation (October 2001) TABLE OF CONTENTS MySQLdb Installation A Short DB-API Script Writing the Script Running the Script
Storing SpamAssassin User Data in a SQL Database Michael Parker. [ Start Slide ] Welcome, thanks for coming out today.
Storing SpamAssassin User Data in a SQL Database Michael Parker [ Start Slide ] Welcome, thanks for coming out today. [ Intro Slide ] Like most open source software, heck software in general, SpamAssassin
FmPro Migrator - FileMaker to SQL Server
FmPro Migrator - FileMaker to SQL Server FmPro Migrator - FileMaker to SQL Server 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 FmPro Migrator - FileMaker to SQL Server Migration
SQL Injection Attack Lab Using Collabtive
Laboratory for Computer Security Education 1 SQL Injection Attack Lab Using Collabtive (Web Application: Collabtive) Copyright c 2006-2011 Wenliang Du, Syracuse University. The development of this document
Online Multimedia Winter semester 2015/16
Multimedia im Netz Online Multimedia Winter semester 2015/16 Tutorial 04 Major Subject Ludwig-Maximilians-Universität München Online Multimedia WS 2015/16 - Tutorial 04-1 Today s Agenda Repetition: Sessions:
INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL
INFORMATION BROCHURE OF Certificate Course in Web Design Using PHP/MySQL National Institute of Electronics & Information Technology (An Autonomous Scientific Society of Department of Information Technology,
Zend Framework Database Access
Zend Framework Database Access Bill Karwin Copyright 2007, Zend Technologies Inc. Introduction What s in the Zend_Db component? Examples of using each class Using Zend_Db in MVC applications Zend Framework
Q&A for Zend Framework Database Access
Q&A for Zend Framework Database Access Questions about Zend_Db component Q: Where can I find the slides to review the whole presentation after we end here? A: The recording of this webinar, and also the
Database migration using Wizard, Studio and Commander. Based on migration from Oracle to PostgreSQL (Greenplum)
Step by step guide. Database migration using Wizard, Studio and Commander. Based on migration from Oracle to PostgreSQL (Greenplum) Version 1.0 Copyright 1999-2012 Ispirer Systems Ltd. Ispirer and SQLWays
A table is a collection of related data entries and it consists of columns and rows.
CST 250 MySQL Notes (Source: www.w3schools.com) MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database objects called tables.
Oracle Database: SQL and PL/SQL Fundamentals NEW
Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-97 Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals
Novell Identity Manager
Password Management Guide AUTHORIZED DOCUMENTATION Novell Identity Manager 3.6.1 June 05, 2009 www.novell.com Identity Manager 3.6.1 Password Management Guide Legal Notices Novell, Inc. makes no representations
Webapps Vulnerability Report
Tuesday, May 1, 2012 Webapps Vulnerability Report Introduction This report provides detailed information of every vulnerability that was found and successfully exploited by CORE Impact Professional during
USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)
USING MYWEBSQL MyWebSQL is a database web administration tool that will be used during LIS 458 & CS 333. This document will provide the basic steps for you to become familiar with the application. 1. To
How to test and debug an ASP.NET application
Chapter 4 How to test and debug an ASP.NET application 113 4 How to test and debug an ASP.NET application If you ve done much programming, you know that testing and debugging are often the most difficult
Oracle Database: SQL and PL/SQL Fundamentals NEW
Oracle University Contact Us: + 38516306373 Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the
StoreGrid Backup Server With MySQL As Backend Database:
StoreGrid Backup Server With MySQL As Backend Database: Installing and Configuring MySQL on Windows Overview StoreGrid now supports MySQL as a backend database to store all the clients' backup metadata
Oracle Database: SQL and PL/SQL Fundamentals
Oracle University Contact Us: 1.800.529.0165 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This course is designed to deliver the fundamentals of SQL and PL/SQL along
Web development... the server side (of the force)
Web development... the server side (of the force) Fabien POULARD Document under license Creative Commons Attribution Share Alike 2.5 http://www.creativecommons.org/learnmore Web development... the server
C++ INTERVIEW QUESTIONS
C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get
Workflow Templates Library
Workflow s Library Table of Contents Intro... 2 Active Directory... 3 Application... 5 Cisco... 7 Database... 8 Excel Automation... 9 Files and Folders... 10 FTP Tasks... 13 Incident Management... 14 Security
Official Amazon Checkout Extension for Magento Commerce. Documentation
Official Amazon Checkout Extension for Magento Commerce Documentation 1. Introduction This extension provides official integration of your Magento store with Inline Checkout by Amazon service. Checkout
Oracle Database: SQL and PL/SQL Fundamentals
Oracle University Contact Us: +966 12 739 894 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training is designed to
Pre-authentication XXE vulnerability in the Services Drupal module
Pre-authentication XXE vulnerability in the Services Drupal module Security advisory 24/04/2015 Renaud Dubourguais www.synacktiv.com 14 rue Mademoiselle 75015 Paris 1. Vulnerability description 1.1. The
PHP Authentication Schemes
7 PHP Authentication Schemes IN THIS CHAPTER Overview Generating Passwords Authenticating User Against Text Files Authenticating Users by IP Address Authenticating Users Using HTTP Authentication Authenticating
Novell Identity Manager
AUTHORIZED DOCUMENTATION Manual Task Service Driver Implementation Guide Novell Identity Manager 4.0.1 April 15, 2011 www.novell.com Legal Notices Novell, Inc. makes no representations or warranties with
Data Tool Platform SQL Development Tools
Data Tool Platform SQL Development Tools ekapner Contents Setting SQL Development Preferences...5 Execution Plan View Options Preferences...5 General Preferences...5 Label Decorations Preferences...6
Build it with Drupal 8
Build it with Drupal 8 Comprehensive guide for building common websites in Drupal 8. No programming knowledge required! Antonio Torres This book is for sale at http://leanpub.com/drupal-8-book This version
Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff
D80198GC10 Oracle Database 12c SQL and Fundamentals Summary Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff Level Professional Delivery Method Instructor-led
SQL Injection Attack Lab
CMSC 426/626 Labs 1 SQL Injection Attack Lab CMSC 426/626 Based on SQL Injection Attack Lab Using Collabtive Adapted and published by Christopher Marron, UMBC Copyright c 2014 Christopher Marron, University
Managed File Transfer with Universal File Mover
Managed File Transfer with Universal File Mover Roger Lacroix [email protected] http://www.capitalware.com Universal File Mover Overview Universal File Mover (UFM) allows the user to combine
Integrating VoltDB with Hadoop
The NewSQL database you ll never outgrow Integrating with Hadoop Hadoop is an open source framework for managing and manipulating massive volumes of data. is an database for handling high velocity data.
Web Development using PHP (WD_PHP) Duration 1.5 months
Duration 1.5 months Our program is a practical knowledge oriented program aimed at learning the techniques of web development using PHP, HTML, CSS & JavaScript. It has some unique features which are as
1. What is SQL Injection?
SQL Injection 1. What is SQL Injection?...2 2. Forms of vulnerability...3 2.1. Incorrectly filtered escape characters...3 2.2. Incorrect type handling...3 2.3. Vulnerabilities inside the database server...4
INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP
INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP by Dalibor D. Dvorski, March 2007 Skills Canada Ontario DISCLAIMER: A lot of care has been taken in the accuracy of information provided in this article,
Data Warehouse Troubleshooting Tips
Table of Contents "Can't find the Admin layer "... 1 "Can't locate connection document "... 3 Column Headings are Missing after Copy/Paste... 5 Connection Error: ORA-01017: invalid username/password; logon
Filtered Views for Microsoft Dynamics CRM
Filtered Views for Microsoft Dynamics CRM Version 4.2.13, March 5, 2010 Copyright 2009-2010 Stunnware GmbH - 1 of 32 - Contents Overview... 3 How it works... 4 Setup... 5 Contents of the download package...
TZWorks Windows Event Log Viewer (evtx_view) Users Guide
TZWorks Windows Event Log Viewer (evtx_view) Users Guide Abstract evtx_view is a standalone, GUI tool used to extract and parse Event Logs and display their internals. The tool allows one to export all
1. To start Installation: To install the reporting tool, copy the entire contents of the zip file to a directory of your choice. Run the exe.
CourseWebs Reporting Tool Desktop Application Instructions The CourseWebs Reporting tool is a desktop application that lets a system administrator modify existing reports and create new ones. Changes to
Sophos Enterprise Console Auditing user guide. Product version: 5.2
Sophos Enterprise Console Auditing user guide Product version: 5.2 Document date: January 2013 Contents 1 About this guide...3 2 About Sophos Auditing...4 3 Key steps in using Sophos Auditing...5 4 Ensure
IceWarp Unified Communications. Installation Guide. Version 10.4
IceWarp Unified Communications Installation Guide Version 10.4 Printed on 16 April, 2012 Contents Installation Guide 1 Pre-requisites... 1 Launch Installer Wizard... 2 Select Language... 5 Welcome Screen...
A Brief Introduction to MySQL
A Brief Introduction to MySQL by Derek Schuurman Introduction to Databases A database is a structured collection of logically related data. One common type of database is the relational database, a term
How To Install Amyshelf On Windows 2000 Or Later
Contents I Table of Contents Part I Document Overview 2 Part II Document Details 3 Part III Setup 4 1 Download & Installation... 4 2 Configure MySQL... Server 6 Windows XP... Firewall Settings 13 3 Additional
SQL Injection. Blossom Hands-on exercises for computer forensics and security
Copyright: The development of this document is funded by Higher Education of Academy. Permission is granted to copy, distribute and /or modify this document under a license compliant with the Creative
T his feature is add-on service available to Enterprise accounts.
SAML Single Sign-On T his feature is add-on service available to Enterprise accounts. Are you already using an Identity Provider (IdP) to manage logins and access to the various systems your users need
ODBC Client Driver Help. 2015 Kepware, Inc.
2015 Kepware, Inc. 2 Table of Contents Table of Contents 2 4 Overview 4 External Dependencies 4 Driver Setup 5 Data Source Settings 5 Data Source Setup 6 Data Source Access Methods 13 Fixed Table 14 Table
Log Analyzer Reference
IceWarp Unified Communications Log Analyzer Reference Version 10.4 Printed on 27 February, 2012 Contents Log Analyzer 1 Quick Start... 2 Required Steps... 2 Optional Steps... 3 Advanced Configuration...
AWS Schema Conversion Tool. User Guide Version 1.0
AWS Schema Conversion Tool User Guide AWS Schema Conversion Tool: User Guide Copyright 2016 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may
Kaseya 2. User Guide. Version 1.1
Kaseya 2 Directory Services User Guide Version 1.1 September 10, 2011 About Kaseya Kaseya is a global provider of IT automation software for IT Solution Providers and Public and Private Sector IT organizations.
PHP Language Binding Guide For The Connection Cloud Web Services
PHP Language Binding Guide For The Connection Cloud Web Services Table Of Contents Overview... 3 Intended Audience... 3 Prerequisites... 3 Term Definitions... 3 Introduction... 4 What s Required... 5 Language
Exchanger XML Editor - Data Import
Exchanger XML Editor - Data Import Copyright 2005 Cladonia Ltd Table of Contents Data Import... 2 Import From Text File... 2 Import From Excel File... 3 Import From Database Table... 4 Import From SQL/XML
Top Navigation menu - Tabs. User Guide 1. www.magazento.com & www.ecommerceoffice.com
User Guide User Guide 1 Extension Description Successful Websites ALWAYS have logical navigation that mirror real world navigational expectations and experiences. Good menus ALWAYS looks 100% clear, because
IceWarp Server Windows Installation Guide
IceWarp Unified Communications IceWarp Server Windows Installation Guide Version 11.3 Published on 2/6/2015 Contents IceWarp Server Windows... 4 Pre-requisites... 5 Launch Installer Wizard... 6 Select
Online shopping store
Online shopping store 1. Research projects: A physical shop can only serves the people locally. An online shopping store can resolve the geometrical boundary faced by the physical shop. It has other advantages,
NASA Workflow Tool. User Guide. September 29, 2010
NASA Workflow Tool User Guide September 29, 2010 NASA Workflow Tool User Guide 1. Overview 2. Getting Started Preparing the Environment 3. Using the NED Client Common Terminology Workflow Configuration
Seamless Web Data Entry for SAS Applications D.J. Penix, Pinnacle Solutions, Indianapolis, IN
Seamless Web Data Entry for SAS Applications D.J. Penix, Pinnacle Solutions, Indianapolis, IN ABSTRACT For organizations that need to implement a robust data entry solution, options are somewhat limited
HOW-TO. Access Data using BCI. Brian Leach Consulting Limited. http://www.brianleach.co.uk
HOW-TO Access Data using BCI http://www.brianleach.co.uk Contents Introduction... 3 Notes... 4 Defining the Data Source... 5 Check the Definition... 7 Setting up the BCI connection... 8 Starting with BCI...
Using SQL Developer. Copyright 2008, Oracle. All rights reserved.
Using SQL Developer Objectives After completing this appendix, you should be able to do the following: List the key features of Oracle SQL Developer Install Oracle SQL Developer Identify menu items of
v4.8 Getting Started Guide: Using SpatialWare with MapInfo Professional for Microsoft SQL Server
v4.8 Getting Started Guide: Using SpatialWare with MapInfo Professional for Microsoft SQL Server Information in this document is subject to change without notice and does not represent a commitment on
Bitrix Site Manager 4.0. Quick Start Guide to Newsletters and Subscriptions
Bitrix Site Manager 4.0 Quick Start Guide to Newsletters and Subscriptions Contents PREFACE...3 CONFIGURING THE MODULE...4 SETTING UP FOR MANUAL SENDING E-MAIL MESSAGES...6 Creating a newsletter...6 Providing
XCloner Official User Manual
XCloner Official User Manual Copyright 2010 XCloner.com www.xcloner.com All rights reserved. xcloner.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project. What is XCloner?
Setting up SQL Translation Framework OBE for Database 12cR1
Setting up SQL Translation Framework OBE for Database 12cR1 Overview Purpose This tutorial shows you how to use have an environment ready to demo the new Oracle Database 12c feature, SQL Translation Framework,
Package sjdbc. R topics documented: February 20, 2015
Package sjdbc February 20, 2015 Version 1.5.0-71 Title JDBC Driver Interface Author TIBCO Software Inc. Maintainer Stephen Kaluzny Provides a database-independent JDBC interface. License
ODBC Driver Version 4 Manual
ODBC Driver Version 4 Manual Revision Date 12/05/2007 HanDBase is a Registered Trademark of DDH Software, Inc. All information contained in this manual and all software applications mentioned in this manual
Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute
Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute JMP provides a variety of mechanisms for interfacing to other products and getting data into JMP. The connection
IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, 2015. Integration Guide IBM
IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, 2015 Integration Guide IBM Note Before using this information and the product it supports, read the information in Notices on page 93.
Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar
Object Oriented Databases OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar Executive Summary The presentation on Object Oriented Databases gives a basic introduction to the concepts governing OODBs
Course Scheduling Support System
Course Scheduling Support System Roy Levow, Jawad Khan, and Sam Hsu Department of Computer Science and Engineering, Florida Atlantic University Boca Raton, FL 33431 {levow, jkhan, samh}@fau.edu Abstract
Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner
1 vk» Java 7 Recipes (,\['«** - < g!p#«josh Juneau Carl Dea Freddy Guime John O'Conner Contents J Contents at a Glance About the Authors About the Technical Reviewers Acknowledgments Introduction iv xvi
Specialized Programme on Web Application Development using Open Source Tools
Specialized Programme on Web Application Development using Open Source Tools Objective: At the end of the course, Students will be able to: Understand various open source tools(programming tools and databases)
This guide shows you the process for adding ecart to your online store so that you can start selling products online.
ecart will add invaluable checkout functionality to your online store. This includes the ability to create and design a shopping cart page, add products to a cart, and create all the necessary pages for
Advanced Web Technology 10) XSS, CSRF and SQL Injection 2
Berner Fachhochschule, Technik und Informatik Advanced Web Technology 10) XSS, CSRF and SQL Injection Dr. E. Benoist Fall Semester 2010/2011 Table of Contents Cross Site Request Forgery - CSRF Presentation
Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro
Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro, to your M: drive. To do the second part of the prelab, you will need to have available a database from that folder. Creating a new
An Introduction to Developing ez Publish Extensions
An Introduction to Developing ez Publish Extensions Felix Woldt Monday 21 January 2008 12:05:00 am Most Content Management System requirements can be fulfilled by ez Publish without any custom PHP coding.
Working with forms in PHP
2002-6-29 Synopsis In this tutorial, you will learn how to use forms with PHP. Page 1 Forms and PHP One of the most popular ways to make a web site interactive is the use of forms. With forms you can have
Advanced Web Security, Lab
Advanced Web Security, Lab Web Server Security: Attacking and Defending November 13, 2013 Read this earlier than one day before the lab! Note that you will not have any internet access during the lab,
IceWarp Server. Log Analyzer. Version 10
IceWarp Server Log Analyzer Version 10 Printed on 23 June, 2009 i Contents Log Analyzer 1 Quick Start... 2 Required Steps... 2 Optional Steps... 2 Advanced Configuration... 5 Log Importer... 6 General...
Access Tutorial 2: Tables
Access Tutorial 2: Tables 2.1 Introduction: The importance of good table design Tables are where data in a database is stored; consequently, tables form the core of any database application. In addition
AWS Schema Conversion Tool. User Guide Version 1.0
AWS Schema Conversion Tool User Guide AWS Schema Conversion Tool: User Guide Copyright 2016 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may
The release notes provide details of enhancements and features in Cloudera ODBC Driver for Impala 2.5.30, as well as the version history.
Cloudera ODBC Driver for Impala 2.5.30 The release notes provide details of enhancements and features in Cloudera ODBC Driver for Impala 2.5.30, as well as the version history. The following are highlights
Specialized Programme on Web Application Development using Open Source Tools
Specialized Programme on Web Application Development using Open Source Tools A. NAME OF INSTITUTE Centre For Development of Advanced Computing B. NAME/TITLE OF THE COURSE C. COURSE DATES WITH DURATION
PHP/MySQL SQL Injections: Understanding MySQL Union Poisoining. Jason A. Medeiros :: CEO :: Presented for DC619 All Content Grayscale Research 2008
PHP/MySQL SQL Injections: Understanding MySQL Union Poisoining Jason A. Medeiros :: CEO :: Presented for DC619 All Content Grayscale Research 2008 Typical MySQL Deployment Most MySQL deployments sit on
