| Index
» Projekty
» phpMyEdit
» Fórum
» Query table for adjacent data |
 |
damian
Založený: 11.11.2004
Príspevky: 2
Zaslal: 2004-11-11 20:25
Návrat hore
Odpovedať s citátom
|
Hi,
I have a problem in PHPmyedit. I have used:
| Kód: |
$opts['fdd']['Company_ID'] = array(
'values' => array(
'table' => 'company',
'column' => 'Company_ID',
'description'=>'Company_Name'),
'name' => 'Company ID',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
); |
to get the info I need which works fine but I would also like to return the column next to Company_ID which is address_1 from the other table
I would have thought I could just do
| Kód: |
| 'description'=>'Company_Name','Address_1'), |
but this only gives me Address_1 instead of both.
Please can anybody help me?
Many thanks
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2004-11-11 22:17
Návrat hore
Odpovedať s citátom
|
http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.input-restrictions.html#AEN816
the syntax is different as you wrote, but you are on the way
|
damian
Založený: 11.11.2004
Príspevky: 2
Zaslal: 2004-11-12 02:02
Návrat hore
Odpovedať s citátom
|
Thanks Michal that seems to be what exactly what I was looking for.
Do you kow how I can use a hyperlink to link this to the correct record in the company table?
Should I Also use a foreign key to enforce the data to be consistent throughout the db or is it enough that the users are forced to enter certain values?
I'm quite new to all of this so would really appreciate some help.
Cheers
Damian
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2004-11-12 09:23
Návrat hore
Odpovedať s citátom
|
foreign key in db
can be an extra security step, but pme handles this correctly so i personnaly never needed it.
link
easiest way: in the description, instead of separator ',' use '<a href...'. if it does not display correctly have a look at 'escape' and 'strip_tags'. enable Text navigation to see what the link should look like.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|