Welcome Guest, Not a member yet? Register   Sign In
maximum field lengths
#1

[eluser]Unknown[/eluser]
I wish to grab the maximum _allowable_ field length for a mysql field.
NOT the value returned by field meta data which only returns the length of the values in the field.
The value would normally be returned by msyql_field_len that provides the maximum allowable length as described by the database schema.
the value returned by field meta data with CI is just a string length of the longest value in that column.

Is this possible with CI?

Kind regards
Kevin
#2

[eluser]Michael Wales[/eluser]
Hmm, I've never used it, but even the docs say it returns the length of the specified field.

Code:
$this->db->select('username');
$query = $this->db->get('users');
echo mysql_field_len($query);




Theme © iAndrew 2016 - Forum software by © MyBB