Databases and PHP. Accessing databases from PHP

Size: px
Start display at page:

Download "Databases and PHP. Accessing databases from PHP"

Transcription

1 Databases and PHP Accessing databases from PHP

2 PHP & Databases PHP can connect to virtuay any database There are specific functions buit-into PHP to connect with some DB There is aso generic ODBC functions that wi work with many other DB Before you can connect with PHP you must aready have a database instaed on the server machine have the proper extensions added to PHP have an account and password on the DB!

3 PHP & Databases These sides wi discuss the basic eements of database connectivity to mysql with PHP: How to connect to a server from PHP How to seect a database from PHP How to perform a query from PHP How to format and view resuts from PHP More information on controing mysql from PHP and on using other DB with PHP can be found at:

4 Basic PHP functions for using mysql mysq_connect() mysq_seect_db() Function Resut Opens a connection to the MySQL server. Requires a hostname, username, and password Seects a db on the MySQL server. mysq_query() mysq_fetch_array() mysq_resut() mysq_error() mysq_cose() Issues the SQL statement. Puts an SQL statement resut row into an array Gets singe eement resut data from a successfu query. Returns ameaningfu error message from MySQL. Coses a previousy opened connection to a MySQL server.

5 Connecting to a MySQL server Must know the name of the server and a vaid username and password. Syntax: $conn = mysq_connect( hostname or IP, username, password ) or die(mysq_error() ); die: A buit-in PHP function that prints an error message and exits the script. The use here, with the mysq_error() function, wi cause an error message to be printed. Usefu for debugging code. $conn: The mysq_connect function returns a pointer to a DB connection. You wi use this variabe ike a fie pointer Whenever you want to refer to this DB, use the $conn variabe

6 Connecting to MySQL II Modern object-oriented technique. Syntax: $conn = new mysqi($servername, $username, $password, $DBname); if ($conn->connect_error) { die("connection faied: ". $conn->connect_error); die: A buit-in PHP function that prints an error message and exits the script. wi cause an error message to be printed. $conn: Contains an object that contains a DB connection. You wi use this variabe ike a fie pointer Whenever you want to refer to this DB, use the $conn variabe

7 Seecting a DB Must have aready connected to mysql Now must choose the DB to use If you connected via Method II the DB is aready chosen Syntax: $db = mysq_seect_db( DBname, $conn) or die(mysq_error) ); Die: same use as before Must know the name of the database $conn is the pointer returned from the mysq_connect function

8 Issuing a SQL command Must have aready connected to mysql and seected a DB Now can issue any SQL command that you have permission to use. Two steps: Form the command into a string Use either the mysq_resut function or the mysq_fetch_assoc function.

9 Making a query Exampe: $sq = SELECT studentid, studentname FROM students ORDER BY studentid ASC ; $sq_resut = mysq_query($sq, $conn) or die(mysq_error() ); whie ($row = mysq_fetch_assoc($sq_resut)){ // process each row First ine creates an SQL query from the students tabe. Second ine sends the query to the mysq server represented by the variabe $conn The resut is paced in the $sq_resut variabe The whie statement processes the resuts mysq_fetch_array function returns the next row of the resut (stored in variabe $sq_resut) as an associative array

10 Making a query, method II Exampe: $sq = SELECT studentid, studentname FROM students ORDER BY studentid ASC ; $resut = $conn->query($sq); whie($row = $resut->fetch_assoc()) { // process each row First ine creates an SQL query from the students tabe. Second ine sends the query to the mysq server represented by the variabe $conn The resut is paced in the $resut object The whie statement processes the resuts fetch_assoc()) function returns the next row of the resut (stored in variabe $resut object) as an associative array

11 Processing a query Exampe (cont). You coud process the data in the whie oop ike this: echo <tabe> ; whie ($row = mysq_fetch_assoc($sq_resut)){ $funame = $row[studentname]; $fuid = $row[studentid]; echo <tr><td>$funame</td><td>$fuid</td></tr> ; echo </tabe> ;

12 Processing a query, method II Exampe (cont). You coud process the data in the whie o ike this: echo <tabe> ; if ($resut->num_rows > 0) { // output data of each row whie($row = $resut->fetch_assoc()) { echo "ID: ". $row["studentid"]. "Name: ".$row["studentname"]. ". $row["dorm"]. "<br>\n"; ese { echo "0 resuts";

13 Processing a query: addendum There is aso a php function mysq_fetch_array($sq_resut) This function does the same thing as mysq_fetch_assoc($sq_resut) Except that the resuting array can be indexed by either names or numbers. If you don t need to access the array by numbers, stick to using mysq_fetch_assoc($sq_resut)

14 Cosing a DB connection. Cosing a DB connection. A DB connection is automaticay cosed when a script ends. If your script is ong, however, it is good to cose the connection expicity. Reason: there are a imited number of connections that a MySQL server can make (depends on admin settings) Syntax: mysq_cose(); Or mysq_cose($conn); Exampe: $conn = mysq_connect( , testuser, conn!now ) or die(mysq_error() ); // a the code to do things with the database mysq_cose($conn);

15 Cosing a DB connect method II Cosing a DB connection. Syntax: $conn->cose(); Exampe: $conn = new mysqi($servername, $username, $password, $DBname); // a the code to do things with the database $conn->cose($conn);

16 Compete exampe: phpdb1.php Database: Ithaca Tabes in database: courses and students Courses tabe: students tabe: courseid Descript instrid Stuff Junk Stars 5654 studentid studentname dorm 1111 John Stanton 2222 Susan Russian House 3333 Gwendoyn Forbes 4444 Gabrie Wiiams

17 Compete exampe: phpdb1.php The next program accesses the students tabe from the Ithaca database Gets ony the studentid and studentname Prints the resuts into a tabe.

18 <?php Compete exampe: phpdb1.php // create connection echo "<htm>\n<head>\n<tite>our Students </tite>\n</head>\n<body bgcoor=yeow>\n"; echo "<p>\n<h1 stye='text-aign:center'>barr Schoo</h1>\n</p>\n<p>\n"; echo "<tabe>\n"; // create the connection and choose the DB $conn = new mysqi("ocahost", "barrg", "ithaca", "Ithaca"); // Check if connection was successfuy made if ($conn->connect_error) { die("connection faied: ". $conn->connect_error); echo "Connected successfuy"; Use your account name and password. The third parameter is the DB name. Use ocahost if you re connecting from the web, use the actua Linux server IP address (eg, ) if you re running this php script on a machine other than the Linux server

19 Compete exampe: phpdb1.php // create an SQL statement $sq = "SELECT studentid, studentname FROM students ORDER BY studentid ASC"; $resut = $conn->query($sq); // Check wether query worked; if it didn t there wi be 0 rows if ($resut->num_rows == 0) { die("connection faied: ". $conn->connect_error); whie ($row = $resut->fetch_assoc()){ $funame = $row['studentname']; $fuid = $row['studentid']; echo "<tr><td>$funame</td><td>$fuid</td></tr>\n"; echo "</tabe>\n"; echo "</body></htm>\n";?> When there are no more rows, the $resut- >fetch_assoc() wi return 0 which wi be put in $row. But the resut of the assignment statement is the vaue that is paced into the variabe $row. The number 0 is interpreted as fase so when there are no rows eft, the oop wi stop.

20 Compete exampe: the Junk Store A simpe store appication that uses a mysql database Two scripts junkstore.php Dispays the items for sae buystuff.php receives an order, updates the database, sends cost information back to the browser

21 Compete exampe: the Junk Store A simpe store appication that uses a mysql database Two scripts junkstore.php Dispays the items for sae buystuff.php receives an order, updates the database, sends cost information back to the browser

22 Compete exampe: the Junk Store Database: Junk Tabes in database: stuff stuff tabe: ID Name quant Price saeprice 1111 Watch Computer PDA Book Pickes

23 junkstore.php <?php // start the htm page echo "<htm>\n<head>\n<tite>john's Junk Jive</tite>\n</head>\n<body bgcoor=yeow>"; echo "<p><h1 stye='text-aign:center'>john's Junk Jive</h1></p><p>"; // create the connection $conn = new mysqi("ocahost", "barrg", "ithaca", "Junk"); // Check if connection was successfuy made if ($conn->connect_error) { die("connection faied: ". $conn->connect_error); // echo "Connected successfuy ;

24 junkstore.php (continued) // create an SQL statement $sq = "SELECT ID, name, quant, price, saeprice FROM stuff ORDER BY ID ASC"; $resut = $conn->query($sq); // Check wether query worked; if it didn t there wi be 0 rows if ($resut->num_rows == 0) { die("connection faied: ". $conn->connect_error); // Create the htm tabe echo "<tabe bgcoor=ightbue>\n"; echo "<form name=buystuff method=post action='buystuff.php'>\n"; echo "<tr>\n<th>item ID</th><th>Item Name</th><th>Quant Left</th><th>Price</th>"; echo "<th>sae Price</th><th>Number Ordered</th>\n</tr>\n"; This ine creates an htm form that wi ca buystuff.php when the submit button is cicked.

25 junkstore.php (continued) // get the info from the database // fetch_assoc gets the next row of the query resut whie ($row = $resut->fetch_assoc()){ $thename = $row['name']; // this gets the vaue associated with the name fied $theid = $row['id']; $thequant = $row['quant']; $theprice = $row['price']; $thesae = $row['saeprice']; // the variabe arow wi contain a string with a the htm tabe info. // note that the variabes that we created above are used to suppy the vaues from the DB $arow = "<tr>\n<td>$theid</td>\n<td>$thename</td>\n"; $arow = $arow."<td>$thequant</td>\n<td>$theprice</td>"; $arow = $arow."<td>$thesae</td>\n"; $arow = $arow."<td><input type=text size=20 name="; $arow = $arow.$thename." vaue=0></td></tr>\n"; echo $arow; echo "<input type=submit vaue='buy Now'>\n"; // this is the button echo "</form></tabe>";?>

26 buystuff.php <?php // create the web page echo "<htm>\n<head>\n<tite>john's Junk Jive</tite>\n</head>\n<body bgcoor=yeow>"; echo "<p><h1 stye='text-aign:center'>john's Junk Jive</h1></p><p>"; echo "<h2>thanks for buying the foowing stuff:</h2>\n</p>\n<p>"; // create a connection to the DB $conn = new mysqi("ocahost", "barrg", "ithaca", "Junk"); // Check connection if ($conn->connect_error) { die("connection faied: ". $conn->connect_error); // create an SQL statement $sq = "SELECT ID, name, quant, price, saeprice FROM stuff ORDER BY ID ASC"; $resut = $conn->query($sq); // make sure that the query got resuts if ($resut->num_rows == 0) echo "0 resuts";

27 buystuff.php (continue) // create the htm tabe echo "<tabe border=1 bgcoor=ightbue>\n"; echo "<tr>\n<th>item Name</th><th>Quant bought</th><th>your Cost</th></tr>"; whie ($row = $resut->fetch_assoc()){ $thename = $row['name']; $theid = $row['id']; $thequant = $row['quant']; $theprice = $row['price']; $thesae = $row['saeprice']; // foreach goes through each item received from web page that caed this script foreach ($_POST as $postname => $postvaue){ if ($postname == $thename && $postvaue <= $thequant && $postvaue > 0){ $totacost = 0; $thequant = $thequant - $postvaue; $totacost = $totacost + $postvaue * $thesae; $arow = "<tr stye='text-aign:center'>\n<td>$thename</td>\n"; $arow = $arow."<td>$postvaue</td>\n<td>\$$totacost</td>"; $arow = $arow."</tr>\n"; echo $arow; $dbupdate = "UPDATE stuff SET quant=$thequant WHERE ID=$theID"; $conn->query($dbupdate);

28 buystuff.php (continue) $conn->cose(); echo "</tabe>\n"; echo "<a href='junkstore.php'>shop More</a>\n"; echo "</body></htm>";?>

Networks and Web for Health Informatics (HINF 6220) Tutorial 13 : PHP 29 Oct 2015

Networks and Web for Health Informatics (HINF 6220) Tutorial 13 : PHP 29 Oct 2015 Networks and Web for Health Informatics (HINF 6220) Tutorial 13 : PHP 29 Oct 2015 PHP Arrays o Arrays are single variables that store multiple values at the same time! o Consider having a list of values

More information

Sample of a training manual for a software tool

Sample of a training manual for a software tool Sampe of a training manua for a software too We use FogBugz for tracking bugs discovered in RAPPID. I wrote this manua as a training too for instructing the programmers and engineers in the use of FogBugz.

More information

Special Edition Using Microsoft Excel Selecting and Naming Cells and Ranges

Special Edition Using Microsoft Excel Selecting and Naming Cells and Ranges Specia Edition Using Microsoft Exce 2000 - Lesson 3 - Seecting and Naming Ces and.. Page 1 of 8 [Figures are not incuded in this sampe chapter] Specia Edition Using Microsoft Exce 2000-3 - Seecting and

More information

PL/SQL, Embedded SQL. Lecture #14 Autumn, Fall, 2001, LRX

PL/SQL, Embedded SQL. Lecture #14 Autumn, Fall, 2001, LRX PL/SQL, Embedded SQL Lecture #14 Autumn, 2001 Fa, 2001, LRX #14 PL/SQL,Embedded SQL HUST,Wuhan,China 402 PL/SQL Found ony in the Orace SQL processor (sqpus). A compromise between competey procedura programming

More information

Quick Start Instructions

Quick Start Instructions Eaton Power Xpert Gateway Minisot (PXGMS) UPS Card Quick Start Instructions Ethernet 10/100 Status DHCP EMP + - CMN 100 Act Ident Power PXGMS UPS Restart TX Setup RX Package Contents Power Xpert Gateway

More information

Guardian 365 Pro App Guide. For more exciting new products please visit our website: Australia: OWNER S MANUAL

Guardian 365 Pro App Guide. For more exciting new products please visit our website: Australia:   OWNER S MANUAL Guardian 365 Pro App Guide For more exciting new products pease visit our website: Austraia: www.uniden.com.au OWNER S MANUAL Privacy Protection Notice As the device user or data controer, you might coect

More information

Advanced Web Programming Practice Exam II

Advanced Web Programming Practice Exam II Advanced Web Programming Practice Exam II Name: 12 December 2017 This is a closed book exam. You may use one sheet of notes (8.5X11in, front only) but cannot use any other references or electronic device.

More information

Databases and PHP. Storing and Retrieving information

Databases and PHP. Storing and Retrieving information Databases and PHP Storing and Retrieving information A database is just information or data stored in a structured manner Database goa: To organize some data in a manner that makes it easy to reate, store,

More information

Use of PHP for DB Connection. Middle and Information Tier

Use of PHP for DB Connection. Middle and Information Tier Client: UI HTML, JavaScript, CSS, XML Use of PHP for DB Connection Middle Get all books with keyword web programming PHP Format the output, i.e., data returned from the DB SQL DB Query Access/MySQL 1 2

More information

file://j:\macmillancomputerpublishing\chapters\in073.html 3/22/01

file://j:\macmillancomputerpublishing\chapters\in073.html 3/22/01 Page 1 of 15 Chapter 9 Chapter 9: Deveoping the Logica Data Mode The information requirements and business rues provide the information to produce the entities, attributes, and reationships in ogica mode.

More information

Use of PHP for DB Connection. Middle and Information Tier. Middle and Information Tier

Use of PHP for DB Connection. Middle and Information Tier. Middle and Information Tier Use of PHP for DB Connection 1 2 Middle and Information Tier PHP: built in library functions for interfacing with the mysql database management system $id = mysqli_connect(string hostname, string username,

More information

Infinity Connect Web App Customization Guide

Infinity Connect Web App Customization Guide Infinity Connect Web App Customization Guide Contents Introduction 1 Hosting the customized Web App 2 Customizing the appication 3 More information 8 Introduction The Infinity Connect Web App is incuded

More information

CitiBusiness Online Token

CitiBusiness Online Token Commercia Bank CitiBusiness Onine Token Quick Reference Guide Thank you for choosing Citi and CitiBusiness Onine to manage your accounts and move funds securey onine. Here is a guide to your new, easy-to-use

More information

Bridge Talk Release Notes for Meeting Exchange 5.0

Bridge Talk Release Notes for Meeting Exchange 5.0 Bridge Tak Reease Notes for Meeting Exchange 5.0 This document ists new product features, issues resoved since the previous reease, and current operationa issues. New Features This section provides a brief

More information

Register Allocation. Consider the following assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x

Register Allocation. Consider the following assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x Register Aocation Consider the foowing assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x Assume that two registers are avaiabe. Starting from the eft a compier woud generate

More information

Avaya Aura Call Center Elite Multichannel Configuration Server User Guide

Avaya Aura Call Center Elite Multichannel Configuration Server User Guide Avaya Aura Ca Center Eite Mutichanne Configuration Server User Guide Reease 6.2.3/6.2.5 March 2013 2013 Avaya Inc. A Rights Reserved. Notice Whie reasonabe efforts were made to ensure that the information

More information

Outerjoins, Constraints, Triggers

Outerjoins, Constraints, Triggers Outerjoins, Constraints, Triggers Lecture #13 Autumn, 2001 Fa, 2001, LRX #13 Outerjoins, Constraints, Triggers HUST,Wuhan,China 358 Outerjoin R S = R S with danging tupes padded with nus and incuded in

More information

COMP519: Web Programming Autumn 2015

COMP519: Web Programming Autumn 2015 COMP519: Web Programming Autumn 2015 In the next lectures you will learn What is SQL How to access mysql database How to create a basic mysql database How to use some basic queries How to use PHP and mysql

More information

Database Connectivity using PHP Some Points to Remember:

Database Connectivity using PHP Some Points to Remember: Database Connectivity using PHP Some Points to Remember: 1. PHP has a boolean datatype which can have 2 values: true or false. However, in PHP, the number 0 (zero) is also considered as equivalent to False.

More information

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program?

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program? Intro to Programming & C++ Unit 1 Sections 1.1-3 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Spring 2018 Ji Seaman 1.1 Why Program? Computer programmabe machine designed to foow instructions Program a set of

More information

Tutorial 3 Concepts for A1

Tutorial 3 Concepts for A1 CPSC 231 Introduction to Computer Science for Computer Science Majors I Tutoria 3 Concepts for A1 DANNY FISHER dgfisher@ucagary.ca September 23, 2014 Agenda script command more detais Submitting using

More information

A Petrel Plugin for Surface Modeling

A Petrel Plugin for Surface Modeling A Petre Pugin for Surface Modeing R. M. Hassanpour, S. H. Derakhshan and C. V. Deutsch Structure and thickness uncertainty are important components of any uncertainty study. The exact ocations of the geoogica

More information

Functions. 6.1 Modular Programming. 6.2 Defining and Calling Functions. Gaddis: 6.1-5,7-10,13,15-16 and 7.7

Functions. 6.1 Modular Programming. 6.2 Defining and Calling Functions. Gaddis: 6.1-5,7-10,13,15-16 and 7.7 Functions Unit 6 Gaddis: 6.1-5,7-10,13,15-16 and 7.7 CS 1428 Spring 2018 Ji Seaman 6.1 Moduar Programming Moduar programming: breaking a program up into smaer, manageabe components (modues) Function: a

More information

NetIQ Access Manager - Advanced Authentication Plugin. Installation Guide. Version 5.1.0

NetIQ Access Manager - Advanced Authentication Plugin. Installation Guide. Version 5.1.0 NetIQ Access Manager - Advanced Authentication Pugin Instaation Guide Version 5.1.0 Tabe of Contents 1 Tabe of Contents 2 Introduction 3 About This Document 3 Environment 4 NetIQ Access Manager Advanced

More information

NCH Software Spin 3D Mesh Converter

NCH Software Spin 3D Mesh Converter NCH Software Spin 3D Mesh Converter This user guide has been created for use with Spin 3D Mesh Converter Version 1.xx NCH Software Technica Support If you have difficuties using Spin 3D Mesh Converter

More information

Web Programming. Dr Walid M. Aly. Lecture 10 PHP. lec10. Web Programming CS433/CS614 22:32. Dr Walid M. Aly

Web Programming. Dr Walid M. Aly. Lecture 10 PHP. lec10. Web Programming CS433/CS614 22:32. Dr Walid M. Aly Web Programming Lecture 10 PHP 1 Purpose of Server-Side Scripting database access Web page can serve as front-end to a database Ømake requests from browser, Øpassed on to Web server, Øcalls a program to

More information

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Illustrated

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Illustrated Intro to Programming & C++ Unit 1 Sections 1.1-3 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Fa 2017 Ji Seaman 1.1 Why Program? Computer programmabe machine designed to foow instructions Program instructions

More information

Bottom-Up Parsing LR(1)

Bottom-Up Parsing LR(1) Bottom-Up Parsing LR(1) Previousy we have studied top-down or LL(1) parsing. The idea here was to start with the start symbo and keep expanding it unti the whoe input was read and matched. In bottom-up

More information

JDBC (Java Database Connectivity)

JDBC (Java Database Connectivity) JDBC (Java Database Coectivity) Database System Cocepts, 6 th Ed. Siberschatz, Korth ad Sudarsha See www.db-book.com for coditios o re-use JDBC Java API for commuicatig with database systems supportig

More information

Straight-line code (or IPO: Input-Process-Output) If/else & switch. Relational Expressions. Decisions. Sections 4.1-6, , 4.

Straight-line code (or IPO: Input-Process-Output) If/else & switch. Relational Expressions. Decisions. Sections 4.1-6, , 4. If/ese & switch Unit 3 Sections 4.1-6, 4.8-12, 4.14-15 CS 1428 Spring 2018 Ji Seaman Straight-ine code (or IPO: Input-Process-Output) So far a of our programs have foowed this basic format: Input some

More information

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9.

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9. Sets & Hash Tabes Week 13 Weiss: chapter 20 CS 5301 Spring 2018 What are sets? A set is a coection of objects of the same type that has the foowing two properties: - there are no dupicates in the coection

More information

Microsoft Visual Studio 2005 Professional Tools. Advanced development tools designed for professional developers

Microsoft Visual Studio 2005 Professional Tools. Advanced development tools designed for professional developers Microsoft Visua Studio 2005 Professiona Toos Advanced deveopment toos designed for professiona deveopers If you re a professiona deveoper, Microsoft has two new ways to fue your deveopment efforts: Microsoft

More information

SQL3 Objects. Lecture #20 Autumn, Fall, 2001, LRX

SQL3 Objects. Lecture #20 Autumn, Fall, 2001, LRX SQL3 Objects Lecture #20 Autumn, 2001 #20 SQL3 Objects HUST,Wuhan,China 588 Objects in SQL3 OQL extends C++ with database concepts, whie SQL3 extends SQL with OO concepts. #20 SQL3 Objects HUST,Wuhan,China

More information

AgreeYa Solutions. Site Administrator for SharePoint User Guide

AgreeYa Solutions. Site Administrator for SharePoint User Guide AgreeYa Soutions Site Administrator for SharePoint 5.2.4 User Guide 2017 2017 AgreeYa Soutions Inc. A rights reserved. This product is protected by U.S. and internationa copyright and inteectua property

More information

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-4,6

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-4,6 Arrays Unit 5 Gaddis: 7.1-4,6 CS 1428 Fa 2017 Ji Seaman Array Data Type Array: a variabe that contains mutipe vaues of the same type. Vaues are stored consecutivey in memory. An array variabe definition

More information

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-3,5

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-3,5 Arrays Unit 5 Gaddis: 7.1-3,5 CS 1428 Spring 2018 Ji Seaman Array Data Type Array: a variabe that contains mutipe vaues of the same type. Vaues are stored consecutivey in memory. An array variabe decaration

More information

l Tree: set of nodes and directed edges l Parent: source node of directed edge l Child: terminal node of directed edge

l Tree: set of nodes and directed edges l Parent: source node of directed edge l Child: terminal node of directed edge Trees & Heaps Week 12 Gaddis: 20 Weiss: 21.1-3 CS 5301 Fa 2016 Ji Seaman 1 Tree: non-recursive definition Tree: set of nodes and directed edges - root: one node is distinguished as the root - Every node

More information

LAMP Apps. Overview. Learning Outcomes: At the completion of the lab you should be able to:

LAMP Apps. Overview. Learning Outcomes: At the completion of the lab you should be able to: LAMP Apps Overview This lab walks you through using Linux, Apache, MySQL and PHP (LAMP) to create simple, yet very powerful PHP applications connected to a MySQL database. For developers using Windows,

More information

Insert the power cord into the AC input socket of your projector, as shown in Figure 1. Connect the other end of the power cord to an AC outlet.

Insert the power cord into the AC input socket of your projector, as shown in Figure 1. Connect the other end of the power cord to an AC outlet. Getting Started This chapter wi expain the set-up and connection procedures for your projector, incuding information pertaining to basic adjustments and interfacing with periphera equipment. Powering Up

More information

Revisions for VISRAD

Revisions for VISRAD Revisions for VISRAD 16.0.0 Support has been added for the SLAC MEC target chamber: 4 beams have been added to the Laser System: X-ray beam (fixed in Port P 90-180), 2 movabe Nd:Gass (ong-puse) beams,

More information

Meeting Exchange 4.1 Service Pack 2 Release Notes for the S6200/S6800 Servers

Meeting Exchange 4.1 Service Pack 2 Release Notes for the S6200/S6800 Servers Meeting Exchange 4.1 Service Pack 2 Reease Notes for the S6200/S6800 Servers The Meeting Exchange S6200/S6800 Media Servers are SIP-based voice and web conferencing soutions that extend Avaya s conferencing

More information

Professor: Alvin Chao

Professor: Alvin Chao Professor: Avin Chao CS149 For Each and Reference Arrays Looping Over the Contents of an Array We often use a for oop to access each eement in an array: for (int i = 0; i < names.ength; i++) { System.out.printn("Heo

More information

understood as processors that match AST patterns of the source language and translate them into patterns in the target language.

understood as processors that match AST patterns of the source language and translate them into patterns in the target language. A Basic Compier At a fundamenta eve compiers can be understood as processors that match AST patterns of the source anguage and transate them into patterns in the target anguage. Here we wi ook at a basic

More information

wepresent SharePod User's Manual Version: 1.1

wepresent SharePod User's Manual Version: 1.1 wepresent SharePod User's Manua Version: 1.1 1 Tabe of Contents 1 OVERVIEW... 3 2 PACKAGE CONTENTS... 4 3 PHYSICAL DETAILS... 4 4 WHAT YOU NEED... 5 5 WEPRESENT SHAREPOD PAIRING... 5 5.1 AUTO PAIRING...

More information

Simba MongoDB ODBC Driver with SQL Connector. Installation and Configuration Guide. Simba Technologies Inc.

Simba MongoDB ODBC Driver with SQL Connector. Installation and Configuration Guide. Simba Technologies Inc. Simba MongoDB ODBC Driver with SQL Instaation and Configuration Guide Simba Technoogies Inc. Version 2.0.1 February 16, 2016 Instaation and Configuration Guide Copyright 2016 Simba Technoogies Inc. A Rights

More information

MySQL: Access Via PHP

MySQL: Access Via PHP MySQL: Access Via PHP CISC 282 November 15, 2017 phpmyadmin: Login http://cisc282.caslab. queensu.ca/phpmyadmin/ Use your NetID and CISC 282 password to log in 2 phpmyadmin: Select DB Clicking on this

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Connecting to a MySQL database in PHP with the mysql_connect() and mysql_select_db() functions Trapping and displaying database

More information

PHP Development - Introduction

PHP Development - Introduction PHP Development - Introduction Php Hypertext Processor PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports many

More information

MCSE TestPrep SQL Server 6.5 Design & Implementation - 3- Data Definition

MCSE TestPrep SQL Server 6.5 Design & Implementation - 3- Data Definition MCSE TestPrep SQL Server 6.5 Design & Impementation - Data Definition Page 1 of 38 [Figures are not incuded in this sampe chapter] MCSE TestPrep SQL Server 6.5 Design & Impementation - 3- Data Definition

More information

Lecture 13: MySQL and PHP. Monday, March 26, 2018

Lecture 13: MySQL and PHP. Monday, March 26, 2018 Lecture 13: MySQL and PHP Monday, March 26, 2018 MySQL The Old Way In older versions of PHP, we typically used functions that started with mysql_ that did not belong to a class For example: o o o o mysql_connect()

More information

DICOM CONFORMANCE STATEMENT FOR DIAGNOSTIC ULTRASOUND SYSTEM MODEL TUS-AI900 V2.5 MODEL TUS-AI800 V2.5 MODEL TUS-AI700 V2.5 MODEL TUS-AI600 V2.

DICOM CONFORMANCE STATEMENT FOR DIAGNOSTIC ULTRASOUND SYSTEM MODEL TUS-AI900 V2.5 MODEL TUS-AI800 V2.5 MODEL TUS-AI700 V2.5 MODEL TUS-AI600 V2. DICOM CONFORMANCE STATEMENT FOR DIAGNOSTIC ULTRASOUND SYSTEM MODEL TUS-AI900 V2.5 MODEL TUS-AI800 V2.5 MODEL TUS-AI700 V2.5 MODEL TUS-AI600 V2.5 CANON MEDICAL SYSTEMS CORPORATION 2017-2018 ALL RIGHTS RESERVED

More information

The Big Picture WELCOME TO ESIGNAL

The Big Picture WELCOME TO ESIGNAL 2 The Big Picture HERE S SOME GOOD NEWS. You don t have to be a rocket scientist to harness the power of esigna. That s exciting because we re certain that most of you view your PC and esigna as toos for

More information

Secure Web-Based Systems Fall Test 1

Secure Web-Based Systems Fall Test 1 Secure Web-Based Systems Fall 2016 CS 4339 Professor L. Longpré Name: Directions: Test 1 This test is closed book and closed notes. However, you may consult the special cheat sheet provided to you with

More information

Contents Presentation... 1 Pack... 2 Connections... 3 Instaation from the CD-ROM... 4 Instaation by Ethernet interface... 6 Instaation by USB interfac

Contents Presentation... 1 Pack... 2 Connections... 3 Instaation from the CD-ROM... 4 Instaation by Ethernet interface... 6 Instaation by USB interfac SAGEM F@st TM 1201 Quick Instaation Guide Contents Presentation... 1 Pack... 2 Connections... 3 Instaation from the CD-ROM... 4 Instaation by Ethernet interface... 6 Instaation by USB interface... 7 Instaation

More information

APLIKACJE INTERNETOWE 8 PHP WYKORZYSTANIE BAZY DANYCH MYSQL

APLIKACJE INTERNETOWE 8 PHP WYKORZYSTANIE BAZY DANYCH MYSQL APLIKACJE INTERNETOWE 8 PHP WYKORZYSTANIE BAZY DANYCH MYSQL PLAN PREZENTACJI Bazy danych w PHP Połączenie z bazą danych Zamknięcie połączenie Tworzenie bazy danych Tworzenie tabeli Operacje na tabelach

More information

Administering Avaya Web Conferencing

Administering Avaya Web Conferencing Administering Avaya Web Conferencing Reease 5.2 Service Pack 2 October 31, 2012 04-603434 Issue 1 2012 Avaya Inc. A Rights Reserved. Notice Whie reasonabe efforts have been made to ensure that the information

More information

MCSE Training Guide: Windows Architecture and Memory

MCSE Training Guide: Windows Architecture and Memory MCSE Training Guide: Windows 95 -- Ch 2 -- Architecture and Memory Page 1 of 13 MCSE Training Guide: Windows 95-2 - Architecture and Memory This chapter wi hep you prepare for the exam by covering the

More information

If your PC is connected to the Internet, you should download a current membership data file from the SKCC Web Server.

If your PC is connected to the Internet, you should download a current membership data file from the SKCC Web Server. fie:///c:/users/ron/appdata/loca/temp/~hhe084.htm Page 1 of 54 SKCCLogger, Straight Key Century Cub Inc. A Rights Reserved Version v03.00.11, 24-Oct-2018 Created by Ron Bower, AC2C SKCC #2748S SKCCLogger

More information

No connection establishment Do not perform Flow control Error control Retransmission Suitable for small request/response scenario E.g.

No connection establishment Do not perform Flow control Error control Retransmission Suitable for small request/response scenario E.g. UDP & TCP 2018/3/26 UDP Header Characteristics of UDP No connection estabishment Do not perform Fow contro Error contro Retransmission Suitabe for sma request/response scenario E.g., DNS Remote Procedure

More information

NCH Software Express Delegate

NCH Software Express Delegate NCH Software Express Deegate This user guide has been created for use with Express Deegate Version 4.xx NCH Software Technica Support If you have difficuties using Express Deegate pease read the appicabe

More information

Readme ORACLE HYPERION PROFITABILITY AND COST MANAGEMENT

Readme ORACLE HYPERION PROFITABILITY AND COST MANAGEMENT ORACLE HYPERION PROFITABILITY AND COST MANAGEMENT Reease 11.1.2.4.000 Readme CONTENTS IN BRIEF Purpose... 2 New Features in This Reease... 2 Instaation Information... 2 Supported Patforms... 2 Supported

More information

index.pdf March 17,

index.pdf March 17, index.pdf March 17, 2013 1 ITI 1121. Introduction to omputing II Marce Turcotte Schoo of Eectrica Engineering and omputer Science Linked List (Part 2) Tai pointer ouby inked ist ummy node Version of March

More information

A Memory Grouping Method for Sharing Memory BIST Logic

A Memory Grouping Method for Sharing Memory BIST Logic A Memory Grouping Method for Sharing Memory BIST Logic Masahide Miyazai, Tomoazu Yoneda, and Hideo Fuiwara Graduate Schoo of Information Science, Nara Institute of Science and Technoogy (NAIST), 8916-5

More information

An Introduction to Design Patterns

An Introduction to Design Patterns An Introduction to Design Patterns 1 Definitions A pattern is a recurring soution to a standard probem, in a context. Christopher Aexander, a professor of architecture Why woud what a prof of architecture

More information

PHP Querying. Lecture 21. Robb T. Koether. Hampden-Sydney College. Fri, Mar 2, 2018

PHP Querying. Lecture 21. Robb T. Koether. Hampden-Sydney College. Fri, Mar 2, 2018 PHP Querying Lecture 21 Robb T. Koether Hampden-Sydney College Fri, Mar 2, 2018 Robb T. Koether (Hampden-Sydney College) PHP Querying Fri, Mar 2, 2018 1 / 32 1 Connect to the Database 2 Querying the Database

More information

Computer Networks. College of Computing. Copyleft 2003~2018

Computer Networks. College of Computing.   Copyleft 2003~2018 Computer Networks Prof. Lin Weiguo Coege of Computing Copyeft 2003~2018 inwei@cuc.edu.cn http://icourse.cuc.edu.cn/computernetworks/ http://tc.cuc.edu.cn Internet Contro Message Protoco (ICMP), RFC 792

More information

Data Management Updates

Data Management Updates Data Management Updates Jenny Darcy Data Management Aiance CRP Meeting, Thursday, November 1st, 2018 Presentation Objectives New staff Update on Ingres (JCCS) conversion project Fina IRB cosure at study

More information

H 10 M645 GETTING STA RT E D. Phase One A/S Roskildevej 39 DK-2000 Frederiksberg Denmark Tel Fax

H 10 M645 GETTING STA RT E D. Phase One A/S Roskildevej 39 DK-2000 Frederiksberg Denmark Tel Fax H 10 M645 GETTING STA RT E D Phase One A/S Roskidevej 39 DK-2000 Frederiksberg Denmark Te +45 36 46 01 11 Fax +45 36 46 02 22 Phase One U.S. 24 Woodbine Ave Northport, New York 11768 USA Te +00 631-757-0400

More information

Basic segmentation from CT: proximal femur

Basic segmentation from CT: proximal femur Chapter 7 Basic segmentation from CT: proxima femur This tutoria wi demonstrate how to import DICOM data from a CT scan of a dry cadaveric femur and appy different fiters and segmentation toos. 7.1 What

More information

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. magic_quotes_runtime = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. magic_quotes_runtime = Off SQLite PHP tutorial This is a PHP programming tutorial for the SQLite database. It covers the basics of SQLite programming with PHP language. There are two ways to code PHP scripts with SQLite library.

More information

Comp 519: Web Programming Autumn 2015

Comp 519: Web Programming Autumn 2015 Comp 519: Web Programming Autumn 2015 Advanced SQL and PHP Advanced queries Querying more than one table Searching tables to find information Aliasing tables PHP functions for using query results Using

More information

Avaya Aura Call Center Elite Multichannel Application Management Service User Guide

Avaya Aura Call Center Elite Multichannel Application Management Service User Guide Avaya Aura Ca Center Eite Mutichanne Appication Management Service User Guide Reease 6.3 October 2013 2014 Avaya Inc. A Rights Reserved. Notice Whie reasonabe efforts have been made to ensure that the

More information

Avaya Extension to Cellular User Guide Avaya Aura TM Communication Manager Release 5.2.1

Avaya Extension to Cellular User Guide Avaya Aura TM Communication Manager Release 5.2.1 Avaya Extension to Ceuar User Guide Avaya Aura TM Communication Manager Reease 5.2.1 November 2009 2009 Avaya Inc. A Rights Reserved. Notice Whie reasonabe efforts were made to ensure that the information

More information

Special Edition Using Microsoft Office Sharing Documents Within a Workgroup

Special Edition Using Microsoft Office Sharing Documents Within a Workgroup Specia Edition Using Microsoft Office 2000 - Chapter 7 - Sharing Documents Within a.. Page 1 of 8 [Figures are not incuded in this sampe chapter] Specia Edition Using Microsoft Office 2000-7 - Sharing

More information

Avaya one-x Mobile Pre-Installation Checklist

Avaya one-x Mobile Pre-Installation Checklist Avaya one-x Mobie 18-602133 Issue 1 November 2007 Avaya one-x Mobie November 2007 1 00A Rights Reserved. Notice Whie reasonabe efforts were made to ensure that the information in this document was compete

More information

Operating Avaya Aura Conferencing

Operating Avaya Aura Conferencing Operating Avaya Aura Conferencing Reease 6.0 June 2011 04-603510 Issue 1 2010 Avaya Inc. A Rights Reserved. Notice Whie reasonabe efforts were made to ensure that the information in this document was compete

More information

Development Technologies. Agenda: phpmyadmin 2/20/2016. phpmyadmin MySQLi. Before you can put your data into a table, that table should exist.

Development Technologies. Agenda: phpmyadmin 2/20/2016. phpmyadmin MySQLi. Before you can put your data into a table, that table should exist. CIT 736: Internet and Web Development Technologies Lecture 10 Dr. Lupiana, DM FCIM, Institute of Finance Management Semester 1, 2016 Agenda: phpmyadmin MySQLi phpmyadmin Before you can put your data into

More information

Locate your Advanced Tools and Applications

Locate your Advanced Tools and Applications MySQL Manager is a web based MySQL client that allows you to create and manipulate a maximum of two MySQL databases. MySQL Manager is designed for advanced users.. 1 Contents Locate your Advanced Tools

More information

Creating an Online Catalogue Search for CD Collection with AJAX, XML, and PHP Using a Relational Database Server on WAMP/LAMP Server

Creating an Online Catalogue Search for CD Collection with AJAX, XML, and PHP Using a Relational Database Server on WAMP/LAMP Server CIS408 Project 5 SS Chung Creating an Online Catalogue Search for CD Collection with AJAX, XML, and PHP Using a Relational Database Server on WAMP/LAMP Server The catalogue of CD Collection has millions

More information

Oracle Data Relationship Management

Oracle Data Relationship Management Orace Data Reationship Management Orace Data Reationship Steward Orace Data Reationship Management for Orace Hyperion Enterprise Panning Suite Orace Data Reationship Management for Orace Hyperion Financia

More information

Lab 7 Introduction to MySQL

Lab 7 Introduction to MySQL Lab 7 Introduction to MySQL Objectives: During this lab session, you will - Learn how to access the MySQL Server - Get hand-on experience on data manipulation and some PHP-to-MySQL technique that is often

More information

BEA WebLogic Server. Release Notes for WebLogic Tuxedo Connector 1.0

BEA WebLogic Server. Release Notes for WebLogic Tuxedo Connector 1.0 BEA WebLogic Server Reease Notes for WebLogic Tuxedo Connector 1.0 BEA WebLogic Tuxedo Connector Reease 1.0 Document Date: June 29, 2001 Copyright Copyright 2001 BEA Systems, Inc. A Rights Reserved. Restricted

More information

Avaya Aura Call Center Elite Multichannel Desktop User Guide

Avaya Aura Call Center Elite Multichannel Desktop User Guide Avaya Aura Ca Center Eite Mutichanne Desktop User Guide Reease 6.2.3/6.2.5 March 2013 2013 Avaya Inc. A Rights Reserved. Notice Whie reasonabe efforts were made to ensure that the information in this document

More information

Eaton 93PM Remote Monitoring Device. Installation and Operation Manual

Eaton 93PM Remote Monitoring Device. Installation and Operation Manual Eaton 93PM Remote Monitoring Device Instaation and Operation Manua IMPORTANT SAFETY INSTRUCTIONS SAVE THESE INSTRUCTIONS This manua contains important instructions that you shoud foow during instaation

More information

As Michi Henning and Steve Vinoski showed 1, calling a remote

As Michi Henning and Steve Vinoski showed 1, calling a remote Reducing CORBA Ca Latency by Caching and Prefetching Bernd Brügge and Christoph Vismeier Technische Universität München Method ca atency is a major probem in approaches based on object-oriented middeware

More information

810 SMART CARD READER

810 SMART CARD READER 810 SMART CARD READER User's Guide IBC DOCUMENT PROG071 This document contains a of the information you need to connect and use an 810 smart card reader. If you have specific questions concerning the reader

More information

Week 4. Pointers and Addresses. Dereferencing and initializing. Pointers as Function Parameters. Pointers & Structs. Gaddis: Chapters 9, 11

Week 4. Pointers and Addresses. Dereferencing and initializing. Pointers as Function Parameters. Pointers & Structs. Gaddis: Chapters 9, 11 Week 4 Pointers & Structs Gaddis: Chapters 9, 11 CS 5301 Spring 2017 Ji Seaman 1 Pointers and Addresses The address operator (&) returns the address of a variabe. int x; cout

More information

Brad A. Myers Human Computer Interaction Institute Carnegie Mellon University Pittsburgh, PA

Brad A. Myers Human Computer Interaction Institute Carnegie Mellon University Pittsburgh, PA PAPERS CHI 98. 18-23 APRIL 1998 Scripting Graphica Appications ABSTRACT Writing scripts (often caed macros ) can be hepfu for automating repetitive tasks. Scripting faciities for text editors ike Emacs

More information

Lecture outline Graphics and Interaction Scan Converting Polygons and Lines. Inside or outside a polygon? Scan conversion.

Lecture outline Graphics and Interaction Scan Converting Polygons and Lines. Inside or outside a polygon? Scan conversion. Lecture outine 433-324 Graphics and Interaction Scan Converting Poygons and Lines Department of Computer Science and Software Engineering The Introduction Scan conversion Scan-ine agorithm Edge coherence

More information

Options. Real SQL Programming 1. Stored Procedures. Embedded SQL

Options. Real SQL Programming 1. Stored Procedures. Embedded SQL Real 1 Options 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

More information

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9.

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9. Sets & Hash Tabes Week 13 Weiss: chapter 20 CS 5301 Fa 2017 What are sets? A set is a coection of objects of the same type that has the foowing two properties: - there are no dupicates in the coection

More information

NetDrive2 SDK Reference

NetDrive2 SDK Reference NetDrive2 SDK Reference Bdrive Inc, Copyright Bdrive inc, A Rights Reserved version date e-mai 0.1 2014-4-10 jyyoon@bdrive.com 0.2 2014-5-9 jyyoon@bdrive.com 0.3 2014-6-14 jyyoon@bdrive.com 2.6 2015-10-29

More information

ITS331 IT Laboratory I: (Laboratory #11) Session Handling

ITS331 IT Laboratory I: (Laboratory #11) Session Handling School of Information and Computer Technology Sirindhorn International Institute of Technology Thammasat University ITS331 Information Technology Laboratory I Laboratory #11: Session Handling Creating

More information

Dynamic Symbolic Execution of Distributed Concurrent Objects

Dynamic Symbolic Execution of Distributed Concurrent Objects Dynamic Symboic Execution of Distributed Concurrent Objects Andreas Griesmayer 1, Bernhard Aichernig 1,2, Einar Broch Johnsen 3, and Rudof Schatte 1,2 1 Internationa Institute for Software Technoogy, United

More information

Hands-free system (for cellular phone)

Hands-free system (for cellular phone) Hands-free system (for ceuar phone) With navigation system Owners of modes equipped with a navigation system shoud refer to the Navigation System Owner s Manua. Without navigation system This system supports

More information

SA2100X-UG001 SA2100. User Guide

SA2100X-UG001 SA2100. User Guide SA2100X-UG001 SA2100 User Guide Version 2.0 August 7,2015 INSEEGO COPYRIGHT STATEMENT 2015 Inseego Corporation. A rights reserved. The information contained in this document is subject to change without

More information

The most up-to-date drivers and manuals are available from the Oki Data Americas web site:

The most up-to-date drivers and manuals are available from the Oki Data Americas web site: PREFACE Every effort has been made to ensure that the information in this document is compete, accurate, and up-to-date. The manufacturer assumes no responsibiity for the resuts of errors beyond its contro.

More information

Chapter 3: KDE Page 1 of 31. Put icons on the desktop to mount and unmount removable disks, such as floppies.

Chapter 3: KDE Page 1 of 31. Put icons on the desktop to mount and unmount removable disks, such as floppies. Chapter 3: KDE Page 1 of 31 Chapter 3: KDE In This Chapter What Is KDE? Instaing KDE Seecting KDE Basic Desktop Eements Running Programs Stopping KDE KDE Capabiities Configuring KDE with the Contro Center

More information

NCH Software Express Accounts Accounting Software

NCH Software Express Accounts Accounting Software NCH Software Express Accounts Accounting Software This user guide has been created for use with Express Accounts Accounting Software Version 5.xx NCH Software Technica Support If you have difficuties using

More information

Module - P7 Lecture - 15 Practical: Interacting with a DBMS

Module - P7 Lecture - 15 Practical: Interacting with a DBMS Introduction to Modern Application Development Prof. Tanmai Gopal Department of Computer Science and Engineering Indian Institute of Technology, Madras Module - P7 Lecture - 15 Practical: Interacting with

More information