cvs: pecl /ibm_db2/tests prepare_blob.inc spook.png test_014.phpt test_048.phpt test_080.phpt test_193.phpt test_194.phpt

From: Date: Thu, 02 Jun 2005 05:10:35 +0000
Subject: cvs: pecl /ibm_db2/tests prepare_blob.inc spook.png test_014.phpt test_048.phpt test_080.phpt test_193.phpt test_194.phpt
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-3215@lists.php.net to get a copy of this message
dbs Thu Jun 2 01:10:35 2005 EDT Added files: /pecl/ibm_db2/tests prepare_blob.inc spook.png test_193.phpt test_194.phpt Modified files: /pecl/ibm_db2/tests test_014.phpt test_048.phpt test_080.phpt Log: Update tests with more LOB and scrollable cursor unit tests.

http://cvs.php.net/diff.php/pecl/ibm_db2/tests/test_014.phpt?r1=1.1&r2=1.2&ty=u Index: pecl/ibm_db2/tests/test_014.phpt diff -u pecl/ibm_db2/tests/test_014.phpt:1.1 pecl/ibm_db2/tests/test_014.phpt:1.2 --- pecl/ibm_db2/tests/test_014.phpt:1.1 Wed Apr 6 13:51:41 2005 +++ pecl/ibm_db2/tests/test_014.phpt Thu Jun 2 01:10:34 2005 @@ -1,5 +1,5 @@ --TEST-- -IBM-DB2: db2_num_rows - select - scrollable cursor 2 +IBM-DB2: scrollable cursor; retrieve negative row --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- http://cvs.php.net/diff.php/pecl/ibm_db2/tests/test_048.phpt?r1=1.2&r2=1.3&ty=u Index: pecl/ibm_db2/tests/test_048.phpt http://cvs.php.net/diff.php/pecl/ibm_db2/tests/test_080.phpt?r1=1.1&r2=1.2&ty=u Index: pecl/ibm_db2/tests/test_080.phpt diff -u pecl/ibm_db2/tests/test_080.phpt:1.1 pecl/ibm_db2/tests/test_080.phpt:1.2 --- pecl/ibm_db2/tests/test_080.phpt:1.1 Wed Apr 6 13:51:41 2005 +++ pecl/ibm_db2/tests/test_080.phpt Thu Jun 2 01:10:34 2005 @@ -19,4 +19,4 @@ ?> --EXPECT-- -42705 +08001 http://cvs.php.net/co.php/pecl/ibm_db2/tests/prepare_blob.inc?r=1.1&p=1 Index: pecl/ibm_db2/tests/prepare_blob.inc +++ pecl/ibm_db2/tests/prepare_blob.inc <?php // Drop the test table, in case it exists $drop = 'DROP TABLE animal_pics'; $result = @db2_exec($conn, $drop); // Create the test table $create = 'CREATE TABLE animal_pics (name VARCHAR(32), picture BLOB(16K))'; $result = db2_exec($conn, $create); // Populate the test table $animals = array( array('Spook', 'spook.png'), array('Helmut', 'pic1.jpg'), ); // Insert the pictures $insert = 'INSERT INTO animal_pics (name, picture) VALUES (?, ?)'; $stmt = db2_prepare($conn, $insert); if (!$stmt) { die("Attempt to prepare statement failed."); } foreach ($animals as $animal) { $name = $animal[0]; $picture = file_get_contents($animal[1]); if (!$picture) { die("Could not retrieve picture '{$animal[1]}'."); } print "Name: {$name} Size: " . strlen($picture) . ".\n"; db2_bind_param($stmt, 1, 'name', DB2_PARAM_IN); db2_bind_param($stmt, 2, 'picture', DB2_PARAM_IN, DB2_BINARY); $result = db2_execute($stmt); } ?> http://cvs.php.net/co.php/pecl/ibm_db2/tests/test_193.phpt?r=1.1&p=1 Index: pecl/ibm_db2/tests/test_193.phpt +++ pecl/ibm_db2/tests/test_193.phpt --TEST-- IBM-DB2: retrieve CLOB columns: forward-only cursor --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); $conn = db2_connect($database, $user, $password); $sql = "SELECT empno, resume_format, resume FROM emp_resume WHERE resume_format = 'ascii'"; if (!$conn) { die('no connection: ' . db2_conn_errormsg()); } $result = db2_exec($conn, $sql); while ($row = db2_fetch_array($result)) { print_r($row); } ?> --EXPECTF-- Array ( [0] => 000130 [1] => ascii [2] => Resume: Delores M. Quintana Personal Information Address: 1150 Eglinton Ave Mellonville, Idaho 83725 Phone: (208) 875-9933 Birthdate: September 15, 1925 Sex: Female Marital Status: Married Height: 5'2" Weight: 120 lbs. Department Information Employee Number: 000130 Dept Number: C01 Manager: Sally Kwan Position: Analyst Phone: (208) 385-4578 Hire Date: 1971-07-28 Education 1965 Math and English, B.A. Adelphi University 1960 Dental Technician Florida Institute of Technology Work History 10/91 - present Advisory Systems Analyst Producing documentation tools for engineering department. 12/85 - 9/91 Technical Writer Writer, text programmer, and planner. 1/79 - 11/85 COBOL Payroll Programmer Writing payroll programs for a diesel fuel company. Interests o Cooking o Reading o Sewing o Remodeling ) Array ( [0] => 000140 [1] => ascii [2] => Resume: Heather A. Nicholls Personal Information Address: 844 Don Mills Ave Mellonville, Idaho 83734 Phone: (208) 610-2310 Birthdate: January 19, 1946 Sex: Female Marital Status: Single Height: 5'8" Weight: 130 lbs. Department Information Employee Number: 000140 Dept Number: C01 Manager: Sally Kwan Position: Analyst Phone: (208) 385-1793 Hire Date: 1976-12-15 Education 1972 Computer Engineering, Ph.D. University of Washington 1969 Music and Physics, B.A. Vassar College Work History 2/83 - present Architect, OCR Development Designing the architecture of OCR products. 12/76 - 1/83 Text Programmer Optical character recognition (OCR) programming in PL/I. 9/72 - 11/76 Punch Card Quality Analyst Checking punch cards met quality specifications. Interests o Model railroading o Interior decorating o Embroidery o Knitting ) Array ( [0] => 000150 [1] => ascii [2] => Resume: Bruce Adamson Personal Information Address: 3600 Steeles Ave Mellonville, Idaho 83757 Phone: (208) 725-4489 Birthdate: May 17, 1947 Sex: Male Marital Status: Married Height: 6'0" Weight: 175 lbs. Department Information Employee Number: 000150 Dept Number: D11 Manager: Irving Stern Position: Designer Phone: (208) 385-4510 Hire Date: 1972-02-12 Education 1971 Environmental Engineering, M.Sc. Johns Hopkins University 1968 American History, B.A. Northwestern University Work History 8/79 - present Neural Network Design Developing neural networks for machine intelligence products. 2/72 - 7/79 Robot Vision Development Developing rule-based systems to emulate sight. 9/71 - 1/72 Numerical Integration Specialist Helping bank systems communicate with each other. Interests o Racing motorcycles o Building loudspeakers o Assembling personal computers o Sketching ) Array ( [0] => 000190 [1] => ascii [2] => Resume: James H. Walker Personal Information Address: 3500 Steeles Ave Mellonville, Idaho 83757 Phone: (208) 725-7325 Birthdate: June 25, 1952 Sex: Male Marital Status: Single Height: 5'11" Weight: 166 lbs. Department Information Employee Number: 000190 Dept Number: D11 Manager: Irving Stern Position: Designer Phone: (208) 385-2986 Hire Date: 1974-07-26 Education 1974 Computer Studies, B.Sc. University of Massachusetts 1972 Linguistic Anthropology, B.A. University of Toronto Work History 6/87 - present Microcode Design Optimizing algorithms for mathematical functions. 4/77 - 5/87 Printer Technical Support Installing and supporting laser printers. 9/74 - 3/77 Maintenance Programming Patching assembly language compiler for mainframes. Interests o Wine tasting o Skiing o Swimming o Dancing ) http://cvs.php.net/co.php/pecl/ibm_db2/tests/test_194.phpt?r=1.1&p=1 Index: pecl/ibm_db2/tests/test_194.phpt +++ pecl/ibm_db2/tests/test_194.phpt --TEST-- IBM-DB2: retrieve CLOB columns: scrollable cursor --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); $conn = db2_connect($database, $user, $password); $sql = "SELECT empno, resume_format, resume FROM emp_resume WHERE resume_format = 'ascii'"; if (!$conn) { die('no connection: ' . db2_conn_errormsg()); } $result = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE)); $i = 1; while ($row = db2_fetch_array($result, $i++)) { print_r($row); } ?> --EXPECTF-- Array ( [0] => 000130 [1] => ascii [2] => Resume: Delores M. Quintana Personal Information Address: 1150 Eglinton Ave Mellonville, Idaho 83725 Phone: (208) 875-9933 Birthdate: September 15, 1925 Sex: Female Marital Status: Married Height: 5'2" Weight: 120 lbs. Department Information Employee Number: 000130 Dept Number: C01 Manager: Sally Kwan Position: Analyst Phone: (208) 385-4578 Hire Date: 1971-07-28 Education 1965 Math and English, B.A. Adelphi University 1960 Dental Technician Florida Institute of Technology Work History 10/91 - present Advisory Systems Analyst Producing documentation tools for engineering department. 12/85 - 9/91 Technical Writer Writer, text programmer, and planner. 1/79 - 11/85 COBOL Payroll Programmer Writing payroll programs for a diesel fuel company. Interests o Cooking o Reading o Sewing o Remodeling ) Array ( [0] => 000140 [1] => ascii [2] => Resume: Heather A. Nicholls Personal Information Address: 844 Don Mills Ave Mellonville, Idaho 83734 Phone: (208) 610-2310 Birthdate: January 19, 1946 Sex: Female Marital Status: Single Height: 5'8" Weight: 130 lbs. Department Information Employee Number: 000140 Dept Number: C01 Manager: Sally Kwan Position: Analyst Phone: (208) 385-1793 Hire Date: 1976-12-15 Education 1972 Computer Engineering, Ph.D. University of Washington 1969 Music and Physics, B.A. Vassar College Work History 2/83 - present Architect, OCR Development Designing the architecture of OCR products. 12/76 - 1/83 Text Programmer Optical character recognition (OCR) programming in PL/I. 9/72 - 11/76 Punch Card Quality Analyst Checking punch cards met quality specifications. Interests o Model railroading o Interior decorating o Embroidery o Knitting ) Array ( [0] => 000150 [1] => ascii [2] => Resume: Bruce Adamson Personal Information Address: 3600 Steeles Ave Mellonville, Idaho 83757 Phone: (208) 725-4489 Birthdate: May 17, 1947 Sex: Male Marital Status: Married Height: 6'0" Weight: 175 lbs. Department Information Employee Number: 000150 Dept Number: D11 Manager: Irving Stern Position: Designer Phone: (208) 385-4510 Hire Date: 1972-02-12 Education 1971 Environmental Engineering, M.Sc. Johns Hopkins University 1968 American History, B.A. Northwestern University Work History 8/79 - present Neural Network Design Developing neural networks for machine intelligence products. 2/72 - 7/79 Robot Vision Development Developing rule-based systems to emulate sight. 9/71 - 1/72 Numerical Integration Specialist Helping bank systems communicate with each other. Interests o Racing motorcycles o Building loudspeakers o Assembling personal computers o Sketching ) Array ( [0] => 000190 [1] => ascii [2] => Resume: James H. Walker Personal Information Address: 3500 Steeles Ave Mellonville, Idaho 83757 Phone: (208) 725-7325 Birthdate: June 25, 1952 Sex: Male Marital Status: Single Height: 5'11" Weight: 166 lbs. Department Information Employee Number: 000190 Dept Number: D11 Manager: Irving Stern Position: Designer Phone: (208) 385-2986 Hire Date: 1974-07-26 Education 1974 Computer Studies, B.Sc. University of Massachusetts 1972 Linguistic Anthropology, B.A. University of Toronto Work History 6/87 - present Microcode Design Optimizing algorithms for mathematical functions. 4/77 - 5/87 Printer Technical Support Installing and supporting laser printers. 9/74 - 3/77 Maintenance Programming Patching assembly language compiler for mainframes. Interests o Wine tasting o Skiing o Swimming o Dancing )
« previous php.pecl.cvs (#3215) next »