Re: IBM DB2 and php
| From: | Gerard Samuel | Date: | Sun, 19 Oct 2003 14:32:23 +0000 |
| Subject: | Re: IBM DB2 and php | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31123@lists.php.net to get a copy of this message | ||
Gerard Samuel wrote:
example script ---- |<?php ||// contains db connection stuff| |include('include.php'); // body is a text field $sql = 'select id, user_id, name, time, body, ip from NULLID.guestbook for read only'; $result = odbc_exec($db->_connection_id, $sql); odbc_longreadlen($result, 0); odbc_binmode($result, 0); // Trying to retrieve 2nd row out of 6 rows returns false when // the query contains a text field var_dump(odbc_fetch_array($result, 2)); ?>|Sorry, bad copy/paste <?php // contains db connection stuff |include('mainfile.php'); |// body is a text field |$sql = 'select id, user_id, name, time, body, ip from NULLID.mpn_guestbook for read only'; $result = odbc_exec($mpn2_db->_db_connection_id, $sql); odbc_longreadlen($result, 0); odbc_binmode($result, 0); |// Trying to retrieve 2nd row out of 6 rows returns false when // the query contains a text field |var_dump(odbc_fetch_array($result, 2)); ?> |