Wednesday, June 15, 2011

PHP/MySQL Tutorial by Graeme Merrall

PHP/MySQL Tutorial webmonkey/programming/Unless you've been living on Mars for the last six to eight months, you've heard of open source software (OSS). This movement has got so much momentum that even the big boys are taking notice. Companies like Oracle, Informix, and a host of others are releasing their flagship database products for that poster child of the OSS movement, Linux. Having a massively complex RDBMS (relational database management system) is all well and good if you know what to do with it. But perhaps you are just getting into the world of databases. You've read Jay's article and you want to put up your own data-driven Web site. But you find you don't have the resources or desire for an ASP server or some pricey database. You want something free, and you want it to work with Unix. Enter PHP and MySQL. These two make up what must be the best combination for data-driven Web sites on the planet. You needn't take my word for it. An unofficial Netcraft survey shows that PHP usage has jumped from 7,500 hosts in June 1998 to 410,000 in March 1999. That's not bad. The combination was also awarded Database of the Year at Webcon98, where it received a lovely tiara. MySQL is a small, compact database server ideal for small - and not so small - applications. In addition to supporting standard SQL (ANSI), it compiles on a number of platforms and has multithreading abilities on Unix servers, which make for great performance. For non-Unix people, MySQL can be run as a service on Windows NT and as a normal process in Windows 95/98 machines. PHP is a server-side...

Website: www.robertobandini.it | Filesize: 175kb
No of Page(s): 9
download

Database Programming (JDBC) Slide Tutorial

Database Programming (JDBC)Database Programming (JDBC) Lecture 5 2 Outline •Jav DB Conectivity (JDBC) overview •JDBC API Reading: Embeded SQL •Direct SQL (= ad-hoc SQL) is rarely used •In practie: SQL is embeded in some aliction code –user interaction, devices, programing logic •SQL code is embeded into a host language using special syntax 4 JDBC (Jav DB Conectivity) Java application { ... "SELECT ... FROM ... WHERE" ... } DBMS 5 xDBC •JDBC: standard for Jav language •OB: Open DataBase Conectivity –Language bindings for /+ 6 JDBC in Practise Java client code JDBC Database server (Postgres, Oracle, MySQL, SQL Server) SQL statements 7 JDBC Drivers Jav aplication JDBC- Driver manger Native Protcol driver JDBC- Net-driver Native API-driver JDBC-ODBC bridge DB Client libray DB- Midleware ODBC DB Client libray JDBC-API 8 Runing a JDBC Aplication Phase Task Relvant jav.sql clases Initialisation Procesing Termination Load river Create conection Generate SQL statements Proces result dat Terminate conection Relase dat structures DriverManger Conectio Statement ResultSet etc. Conection Statemet etc. 9 A Simple JDBC Aplication loadDriver getConection createStatement excute(SQL) Result handling More results ? closeStatement closeConection no yes import jav.sql.*; public las jdbctest { public static void main(String args[]){ try{ DriverManger.egisterDriver(new com.ysql.jdbc.Driver( ); Clas.forName(“com.mysql.jdbc.Driver”) onection con = DriverManger.getConection ("jdbc:mysql:/lsir-cis-pc1:306/is01", user", "paswd"); Statement stt = con.createStatement(); ResultSet rs = stmt.excuteQuery (”SELCT nae, number FROM pcmtable WHER number < 2"); while(rs.next() System.out.printl(rs.getString(1) + " ( + rs.getInt(2) + ")); stmt.close() con.close(); } catch(Exception e){ System.er.printl(e); } 10 Loading of Driver •Create an istance of the driver •Register driver in the driver manger •Explicit loading Class.forName(“com.mysql.jdbc.Driver”) •Sevral drivers can be loade and rgister 1 Example: Oracle and JDBC Class.forName("oracle.jdbc.driver.OracleDriver ”) Connection con = DriverManager.getConnection( "jdbc:oracle:thin:@dbaprod1:1544:SHR1_PRD", username, passwd);...

Website: lsirwww.epfl.ch | Filesize: 387kb
No of Page(s): 15
Download: http://lsirwww.epfl.ch/courses/iis/2009ss/slides/slides-5-JDBC.pdf

Developing Database Applications Using MySQL Connector/C++

Developing Database Applications Using MySQL Connector/C++This tutorial will show you the essential steps to build and install MySQL Connector/C++ driver, with simple examples to connect, insert, and retrieve data from a MySQL database. Because the focus is on database connectivity from a C++ application, this document assumes that some kind of MySQL database is already up and accessible from the client machine.

Application developers who are new to MySQL Connector/C++ but not to C++ programming and MySQL database, are the target audience of this tutorial. Listed below are the tools and technologies used to compile, build and run the examples in this tutorial. Database MySQL Server 5.1.24-rc C++ Driver MySQL Connector/C++ 1.0.5 MySQL Client Library MySQL Connector/C 6.0 Compiler Sun Studio 12 C++ compiler Make CMake 2.6.3 Operating System OpenSolaris 2008.11 32-bit CPU / ISA Intel Centrino / x86 Hardware Toshiba Tecra M2 Laptop Contents • MySQL C++ Driver Based on JDBC 4.0 Specification • Installing MySQL Connector/C++ • Runtime Dependencies • IDE for Developing C++ Applications • Create the City Table in the test Database for Code Examples • Testing the MySQL Database Connectivity With the Connector/C++ • Using Prepared Statements • Using Transactions • Accessing Result Set Metadata • Accessing Database Metadata • Accessing Parameter Metadata from a PreparedStatement Object • Catching Exceptions • Debug Tracing with MySQL Connector/C++ • For More Information • About the author • Appendix I: Installing MySQL Connector/C++ from Source Copyright © 2009 MySQL • Reprint by permission only 2 MySQL C++ Driver Based on JDBC 4.0 Specification MySQL Connector/C++ is one of the latest...

Website: docs.huihoo.com | Filesize: 320kb
No of Page(s): 36
Download: http://docs.huihoo.com/mysql/mysql-apps-using-connector-and-cpp.pdf