realise, that on a overview-page of a table the field which is the unique key is also shown?
For example: I have a table with three fields, I, Name, Age, on the overview-page i can only see the fields Name and Age because i marked ID as the unique key. When i select an entry and click view, in the following page i can see the ID-field also, but i used to have it in the overview too.
Can someone please help me...
Thanks & Regards
Sascha
|
I have the same problem. I would like my primary key displayed. My code looks like:
| Kód: |
$opts['fdd']['TDYStatus'] = array(
'name' => 'Status',
'select' => 'T',
'maxlen' => 25,
'required' => true,
'sort' => true
);
$opts['fdd']['ApproxStartDate'] = array(
'name' => 'Start Date',
'select' => 'T',
'maxlen' => 10,
'default' => '0000-00-00',
'required' => true,
'sort' => true
);
$opts['fdd']['TDYRefNum'] = array(
'name' => 'TDY Ref #',
'select' => 'T',
'options' => 'AVCPDR', // auto increment
'maxlen' => 11,
'default' => '0',
'sort' => true
);
$opts['fdd']['LeadOffice'] = array(
'name' => 'LeadOffice',
'select' => 'T',
'maxlen' => 25,
'required' => true,
'sort' => true
);
|
But TDY_Ref_Num doens't show up! How can I make it show up?
Also, I am very confused about does phpMyEdit allow you to add columns that are fields from another table? On the Web site somewhere I saw that it said phpMyEdit was only intended to take stuff from a single table, but on the net I see references to the contrary.
I read the docs and, I am not trying to do get a dropdown list of values from antoher table or anything like that. I am simply trying to display a field from the other table along with those fields above.
I read some other posts but did not understand how to do this. I tried 'values' = array( 'table' => 'myothertable' , etc... like I saw a few posts back but this came up blank Also, I don't really understand what to put in $opts['fdd']['???what goes here???] when I am getting it from antoher table? If I use thes same name a field form my first table, then that field does not show up in its own row, plus the row is blank that I am trying to use.
What I want to do is this:
I have 2 tables:
TDYRequesters and TDYs
They both have a TDY_Ref_ID (which will contain the same value for each record). There can be more than 1 TDY per TDYRequester, but each TDY_Ref_Num (TDY) should be a row.
TDYRequesters has fields like Office, etc.
TDYs has fields like those above (LeadOffice, StartDate, etc).
How can I get phpMyEdit to (i am using it to display only!) just display what I have above plus the Office field from TDYRequesters?
I need to grab stuff from some other tables as well, but if somone could please give me an example how to do this one, i can figure out the rest from that.
Your help will be greatly appreciated.
Thank you,
Enis Pilavdzic
|
| pilavdzic Napísal: |
I read the manual before I posted, and I went back and reviewed the sections you pointed out, but I still do not see what I am doing wrong.
My Code is:
$opts['fdd']['TDYRefNum'] = array(
'name' => 'TDY Ref #',
'select' => 'T',
'options' => 'AVCPDR', // auto increment
'maxlen' => 11,
'default' => '0',
'sort' => true
);
There is no 'H' there for hidden in the options, so why is it hidden?
I don't think that behaves as described. Am I missing something or is that a bug?
Thanks,
Enis |
P.S. I just found that the difference betweent that line and others was that the others did not have an options line at all, so I took it out, and that worked! So, that answers my question. However, it seems that the documentation is in a totally different form than this code. Is this the documentation for this version?
|
So, the remaining question is how do I display a field from another table?
As much as I like your product I have to tell you that some documentation is missing. I can see effort was put into making the documentation but some basics are not there. For example: I read the manual blurbs you indicated, and they say "Column joining: It is also possible to have multiple fields in your description. For example, to concatenate two description labels found in a different table:"
This is NOT what I want to do. Even if it was, this section is very unclear on how to do this so I am unable to understand enough about how this works to figure out what I do want (see below).
Now, what I Do want to do is simply display a field from another table along with fields from this table (by the same index, TDY_Ref_Num), I cannot just combine the information into one table because there can be more than one TDY per Requester. Meaning that one person can request multiple things. This is my table of things and I just want to display the persons name who owns them beside each thing.
So, let me say this again, this has nothing to do with the description labels, or concatenating anything. I want another column to display in the table with a field from antoher table just like it is displaying fields from this table.
I will be using this for Display Only! But would this work if I needed to edit? If I edited a requester, although he appeared in 2 rows, would it change that requesters information? Or would I need to edit him in both rows? How is this handled?
Can phpMyEdit even do this?
Since this is such a common thing, could you include a version of this question and an answer in the FAQs or something?
Thanks!
|
| pilavdzic Napísal: |
P.S. I just found that the difference betweent that line and others was that the others did not have an options line at all, so I took it out, and that worked! |
Add "LF" to options:
From http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.basic-options.html#AEN732
------------------------
Display options
An optional parameter to control whether a field is displayed in the add, change, copy, delete, view, list, or filter views.
A -- add
C -- change
P -- copy
V -- view
D -- delete
L -- table list
F -- table filter
Example 4-6. Field display options
$opts['fdd']['col_name']['options'] = 'LF'; // shows only in table list/filter
|