|
Posted by Michael Austin on 02/18/06 00:21
rbutlerjr@gmail.com wrote:
> I've run into a strange problem with mysql_field_len returning -1 on
> any / all calls to it. This is on an Unbuntu Dapper system, with PHP
> 4.4.2, MySQL 4.1.15, and the PHP/MySQL Client API is 5.0.18. This is
> using the default dpkg installs of php4-mysql and mysql-server-4.1
> This same call and associated code works properly on existing Windows
> and Linux systems (both with older versions of PHP & MySQL). The
> primary difference that I can see is those systems are using API
> 3.23.49.
> I'm barely a linux novice (much less intermediate level), so I'm not
> sure how to go about changing the API version. Any help would be
> appreciated.
>
can we see the code line where you are trying to use this? and are you using it
properly?
From the docs:
Example 1. A mysql_fetch_len() example
<?php
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
// Will get the length of the value in email so for example
// user@example.com would give us a length of 16
$length = mysql_fetch_len($result, 'email');
echo $length;
?>
--
Michael Austin.
DBA Consultant
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)
[Back to original message]
|