Re: database.links.ini question
| From: | Sarah Gray | Date: | Thu, 08 Jul 2004 00:15:28 +0000 |
| Subject: | Re: database.links.ini question | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-13539@lists.php.net to get a copy of this message | ||
Yes, I was talking about DB_DataObject_FormBuilder, sorry for not specifying
that
more clearly.
I did look at the big 1.37 changelog earlier -- but not in-depth enough. I
will
go through it all more closely later -- and decide where I'm going to make
the adjustment -- to my schema
or to my version of FormBuilder ;)
In a nutshell though -- .only ints can be linking fields unless I upgrade to
the FormBuilder 1.37 in CVS?
Thanks,
s.
Justin Patrin wrote:
> If you're talking about DB_DataObject_FormBuilder...
>
> The newest release still only allows integers to be linking fields.
> The CVS version of FormBuilder allows this, but also makes many other
> changes, mostly to the names of options. Make sure to read the CVS
> changelog (the big one for 1.37) and use the fix script to update.
>
> On Wed, 07 Jul 2004 18:57:23 -0500, Sarah Gray <sarah@fabled.net> wrote:
> > Hi --
> >
> > I'm experiencing a puzzling (lack of) behavior that I hope tracks to
> > something I'm not understanding fully.
> > I'd much appreciate someone's input.
> >
> > Do the fields one is linking to in the database.links.ini file need to
> > be integers in order to work?
> > If not, continue reading -- if so, well, then -- does anyone have a
> > workaround suggestion?
> >
> > Details:
> >
> > I have a database.links.ini file (named with the database name, not the
> > word "database"), and only some of the
> > links I specify in this file are being created in my forms.When the
> > links are *not* created, a regular text field
> > displays instead of the drop down menu I am expecting.
> >
> > For instance, the text of the database.links.ini file is:
> >
> > [Presentations]
> > pin_number = Attendees: pin_number
> > session_id = Countries: country_id
> >
> > [Attendees]
> > state_id = States: state_id
> > city = Countries: country_id
> >
> > The only link in the file that properly creates a linked field in my
> > table is session_id.
> > I can link it to any of the other options that I have specified in the
> > file, and the dropdown link menu will be created.
> > None of the other three "work".
> >
> > So.. I thought perhaps that the fields needed to be a certain data type
> > (...integer...?). I looked online and found this:
> > "The databasename.links.ini file contains a section for each table, then
> > the row that is linked equal to the table and row that it should locate
> > the row from. It assumes the relationships are non-primary id to primary
> > id, as the example below shows[...]"
> >
> > So the data types are as follows (taken from the dataObject classes).
> > (I'm not showing data types of the fields I'm trying to link, because
> > they all work when they are paired with session_id, so the problem isn't
> > them).
> >
> > pin_number // string(40) not_null primary_key unique_key
> > session_id // int(3) not_null multiple_key unsigned zerofill (This
> > is the one that works -- the only int)
> > state_id // string(2) not_null multiple_key
> > city // string(40)
> >
> > *Note -- the reason I am trying to link "city" with country_id is that I
> > wanted to try using a field that was not identified in any way as a key,
> > just to see if that was where I was going wrong. It didn't work with
> > country_id (// string(5) not_null multiple_key) either. I don't have
> > any other int fields handy to try without regenerating the schema --
> > which I can't do until tomorrow. I hope my little theory is wrong -- it
> > seems pretty limiting.
> >
> > Thanks in advance,
> >
> > s.
> >
> > --
> > PEAR General Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > !DSPAM:40ec8bbc121825650314712!
> >
> >
>
> --
> DB_DataObject_FormBuilder - The database at your fingertips
> http://pear.php.net/package/DB_DataObject_FormBuilder
>
> paperCrane --Justin Patrin--
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php