Hi Mike, all,
Mike Aubury wrote:
I'm probably being a bit stupid - but I'm trying to determine (in code) the
length of the string in the schema for a given table.
So - for example :
create table a (
blah char(20)
)
I want to return '20', but I'm
Basically - so I can display it in the same form as the orginal table..
Or - if you want the longer version
I work with an Opensource project called 'Aubit4GL' (its a clone of
Informix4GL - which allows you to write really nice screen based database
oriented programs + reports), see
Mike, all,
Mike Aubury wrote:
[[...]]
So - the next question is...
Is there anyway in code I can find the 'fiddle' factor (1,3,or now possibly
4)
that I need to use to divide by to get back to the character width specified
in the CREATE TABLE ?
In the information_schema database,
It works for me, I used your code:
Field =mycol Type=254 Length=20
so at least your code is fine, and the problem must be somewhere
else. I am using RH EL3.
cheers,
Doug
On 6 Oct 2008, at 19:52, Mike Aubury wrote:
I'm probably being a bit stupid - but I'm trying to determine (in
code)
Mike Aubury schrieb:
Excellent - this seems to be the issue - the show create table shows :
mysql show create table a\g
+---++
| Table | Create
Table
Excellent - this seems to be the issue - the show create table shows :
mysql show create table a\g
+---++
| Table | Create
Table
[EMAIL PROTECTED] (Mike Aubury) writes:
I'm probably being a bit stupid - but I'm trying to determine (in code) the
length of the string in the schema for a given table.
So - for example :
create table a (
blah char(20)
)
I want to return '20', but I'm
I'm probably being a bit stupid - but I'm trying to determine (in code) the
length of the string in the schema for a given table.
So - for example :
create table a (
blah char(20)
)
I want to return '20', but I'm getting '60' when I use mysql_list_fields..