Re: IBM DB2 and php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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));

?>
|

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux