Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Tuesday, April 16, 2024
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  having ID field in the list mode as well

phpMyEdit General     having ID field in the list mode as well
Post new topic   Reply to topic    
 
djblueprint     Joined: 09 Jun 2004   Posts: 1  
Post Posted: 2004-06-09 17:29
Back to top  Reply with quote     

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

 
pilavdzic     Joined: 26 Oct 2004   Posts: 9  
Post Posted: 2004-10-26 16:18
Back to top  Reply with quote     

I have the same problem. I would like my primary key displayed. My code looks like:

Code:

$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

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2004-10-27 09:21
Back to top  Reply with quote     

we have friendly manual, see

http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.basic-options.html#AEN732
http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.input-restrictions.html#AEN816

and comment if it's clearly explained

 
pilavdzic     Joined: 26 Oct 2004   Posts: 9  
Post Posted: 2004-10-27 16:10
Back to top  Reply with quote     

(edit) see below


Last edited by pilavdzic on 2004-10-27 16:15, edited 1 time in total

 
pilavdzic     Joined: 26 Oct 2004   Posts: 9  
Post Posted: 2004-10-27 16:14
Back to top  Reply with quote     

pilavdzic wrote:
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?

 
pilavdzic     Joined: 26 Oct 2004   Posts: 9  
Post Posted: 2004-10-27 16:31
Back to top  Reply with quote     

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     Joined: 26 Oct 2004   Posts: 9  
Post Posted: 2004-10-27 16:34
Back to top  Reply with quote     

I think I found the answer here, but it is spread across multiple messages and doesn't instill me with the confidence that phpMyEdit was designed to do this.

http://opensource.platon.sk/forum/projects/viewtopic.php?p=1934#1934

Is this the way I should try to do this, or is there a better more proper way?

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2004-10-28 17:36
Back to top  Reply with quote     

yes, you need 'values' option (it applies to both view and change screens), it does just what you need. try it. see the second of my links (you just need to specify 'table','column',and maybe 'description').

 
Nick9955     Joined: 01 Aug 2014   Posts: 1  
Post Posted: 2014-08-01 13:41
Back to top  Reply with quote     

pilavdzic wrote:


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

 
davidmartin4797     Joined: 03 Dec 2019   Posts: 61  
Post Posted: 2021-03-08 06:49
Back to top  Reply with quote     

We use only original parts in case of replacement. Geek Squad will assist in everything that you use on daily basis. Any customer and client of Geek Squad can schedule their personal support at any time according to their space.

For more information visit site :- Geek Squad tech support

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy