Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 28. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  subforms

phpMyEdit Features     subforms
Odoslať novú tému   Odpovedať na tému    
 
IRM     Založený: 24.11.2004   Príspevky: 5  
Príspevok Zaslal: 2004-11-24 15:05
Návrat hore  Odpovedať s citátom     

I am desparate for the subform functionality. Have a system in production on our intranet and without the subforms some functionality is pretty cumbersome. So I downloaded the subform files related to bug #280.

Am not too well versed with HTML and PHP, but I cannot get it to work. It seems the parameter posted to the child forms is not populated. At least it is empty and MySQL protests: e.g.
---------------------------------------------------
phpMyEdit error: invalid SQL query
SELECT PMEtable0.ID AS qf0,PMEtable0.email AS qf2,PMEjoin3.type AS qf3,PMEtable0.type_ID AS qf3_idx FROM emails AS PMEtable0 LEFT OUTER JOIN test.people AS PMEjoin1 ON PMEjoin1.ID = PMEtable0.people_ID LEFT OUTER JOIN test.types AS PMEjoin3 ON PMEjoin3.ID = PMEtable0.type_ID WHERE (people_ID = ) ORDER BY PMEtable0.ID
---------------------------------------------------
makes sense as people_ID is empty.

What should I do to get people.php to populate the parameter posted to email.php?

Please help!

IRM

 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2004-11-24 21:03
Návrat hore  Odpovedať s citátom     

well, this is in the 'emails' subform, right ?

at the beginning of emails.php file, you may see these lines :

Kód:
//get the current main record ...
isset($_POST['PE_rec']) && $frec = $_POST['PE_rec'];
isset($_GET['PE_rec']) && $frec = $_GET['PE_rec'];


This is how the filter (the Where sql part) for the subform is computed
(to be short, it gets the current MAIN record id to be able to perform correct "join")

It is possible that your server configuration doesn't allow to retrieve POST or GET var with this method.

What should be working is :
Kód:
global $HTTP_POST_VARS, $HTTP_GET_VARS;
isset($HTTP_POST_VARS['PE_rec']) && $frec = $HTTP_POST_VARS['PE_rec'];
isset($HTTP_GET_VARS['PE_rec']) && $frec = $HTTP_GET_VARS['PE_rec'];


_________________
hbernard - phpMyEdit updater.
 
IRM     Založený: 24.11.2004   Príspevky: 5  
Príspevok Zaslal: 2004-11-25 09:37
Návrat hore  Odpovedať s citátom     

hbernard
Thanks, this works! and saved my ....
Keep up the good work!!
IRM

 
IRM     Založený: 24.11.2004   Príspevky: 5  
Príspevok Zaslal: 2004-11-26 14:04
Návrat hore  Odpovedať s citátom     

Having the subforms working. Now I need to combine this with another patched version as mentioned in "Advanced table lookup -- joining three tables". What should I do to get the combined class? [am not a CVS expert either, my roots are in C and relational database design :-) ]

In short I need subforms and the advanced table look-up functionality.

If I have that the sky is really the limit in what I can do with PME!

Cheers, IRM

 
laggerboutique     Založený: 15.12.2004   Príspevky: 1  
Príspevok Zaslal: 2004-12-15 09:53
Návrat hore  Odpovedať s citátom     

I'm converting an Access database to MySQL. I want very much to create the subforms in phpMyEdit that I use in Access. I'm trying to check out the subform demo, but when I run it, I get the following message posted twice (once where I assume the Emails subform should be and again where I assume the Phones subform should be):

MySQL error 1146
Table 'livingro_lrbtest.types' doesn't exist
phpMyEdit error: invalid SQL query
SELECT PMEtable0.ID AS qf0,PMEtable0.email AS qf2,PMEjoin3.type AS qf3,PMEtable0.type_ID AS qf3_idx FROM emails AS PMEtable0 LEFT OUTER JOIN livingro_lrbtest.people AS PMEjoin1 ON PMEjoin1.ID = PMEtable0.people_ID LEFT OUTER JOIN livingro_lrbtest.types AS PMEjoin3 ON PMEjoin3.ID = PMEtable0.type_ID WHERE (people_ID = 1) ORDER BY PMEtable0.ID

I'm very new to PHP and MySQL. Do I need to create the table "types" for this to work?

Thanks

 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2004-12-23 07:54
Návrat hore  Odpovedať s citátom     

In the first demo, the table 'types' was not included (I forgot) in the SQL script.

Could you try the most recent demo file ?

_________________
hbernard - phpMyEdit updater.
 
ned@kelly.org.au     Založený: 08.04.2004   Príspevky: 22   Bydlisko: Mosquito Flat, Australia
Príspevok Zaslal: 2005-01-10 05:45
Návrat hore  Odpovedať s citátom     

subforms rock!!!

question:
in the demo the subforms where 'query' result pages
ie. phone numbers for Joe

can subforms do something like the 'Who?' tab in the demo for all pages,
ie. if i have a table of 30 rows can rows 1 to 10 be in page 1, 11 - 20 in page 2 and 21 - 30 in page 3, this would really kick ass it if could

cheers

ned

 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2005-01-10 06:44
Návrat hore  Odpovedať s citátom     

Well, no ;-/

Subforms are "how to display joined table into a form from a main table"

The feature you're requesting is certainly doable, but it has to deal with the 'goto'/'filters' stuff, not with subforms.

_________________
hbernard - phpMyEdit updater.
 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov