| Index
» Projekty
» phpMyEdit
» Fórum
» Simplest way to work with two tables? |
 |
dani
Založený: 08.04.2007
Príspevky: 1
Zaslal: 2007-04-08 19:45
Návrat hore
Odpovedať s citátom
|
Hello all
I'm a NEWBIE and so far I've been able to use PHPMyEdit to generate a couple of pages for browsing and editing tables. Very satisfied with the results.
Now I'd like to setup a TWO TABLES system, so I can browse and edit the ORDERS table (order id, customer info, date received, order status) and optionally from there jump back and forth to the matching info in the ORDER-DETAIL table (order id, product code, quantity), which may have several entries per order id.
What would be the easiest way to accomplish that, with MINIMAL hands-on code modifications?
One way I imagined is to first make two independent scripts, one for each table, and then add a URL field to jump to each other, passing the order id as a parameter inside the url. Is this possible? Is there a better way?
Thanks for any assistance.
|
workingdog
Založený: 07.04.2007
Príspevky: 10
Zaslal: 2007-04-11 15:33
Návrat hore
Odpovedať s citátom
|
There does not appear to be anyone from Platon monitoring this forum, but I'll take a stab.
The easiest way is to use the 'URL' option to link to the other "tabel".
'URL' => 'http://www.mysite.com/importthis.php?recordID=$value'
where importthis.php is the code for the other table and recordID is the field in the other table and $value is the value you are passing for the record you want to view.
Peter
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|