IRM
Joined: 24 Nov 2004
Posts: 5
Posted: 2004-11-24 15:05
Back to top
Reply with quote
|
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
Joined: 23 Mar 2003
Posts: 159
Location: FRANCE
Posted: 2004-11-24 21:03
Back to top
Reply with quote
|
well, this is in the 'emails' subform, right ?
at the beginning of emails.php file, you may see these lines :
| Code: |
//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 :
| Code: |
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
Joined: 24 Nov 2004
Posts: 5
Posted: 2004-11-25 09:37
Back to top
Reply with quote
|
hbernard
Thanks, this works! and saved my ....
Keep up the good work!!
IRM
|
IRM
Joined: 24 Nov 2004
Posts: 5
Posted: 2004-11-26 14:04
Back to top
Reply with quote
|
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
Joined: 15 Dec 2004
Posts: 1
Posted: 2004-12-15 09:53
Back to top
Reply with quote
|
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
Joined: 23 Mar 2003
Posts: 159
Location: FRANCE
Posted: 2004-12-23 07:54
Back to top
Reply with quote
|
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
Joined: 08 Apr 2004
Posts: 22
Location: Mosquito Flat, Australia
Posted: 2005-01-10 05:45
Back to top
Reply with quote
|
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
Joined: 23 Mar 2003
Posts: 159
Location: FRANCE
Posted: 2005-01-10 06:44
Back to top
Reply with quote
|
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.
|
jiliray916@
Joined: 01 Nov 2023
Posts: 563
Posted: 2024-01-06 09:26
Back to top
Reply with quote
|
Our own chaga mushroom comes with a schokohutige, consistent, charcoal-like arrival, a whole lot of dissimilar to the style of the standard mushroom. Chaga Tincture
roof cleaning bristol
|
QADIRSEO
Joined: 29 Dec 2023
Posts: 1168
Posted: 2024-01-08 11:02
Back to top
Reply with quote
|
Your blog has piqued a lot of real interest. I can see why since you have done such a good job of making it interesting. I appreciate your efforts very much.
shillong teer result
|
|
Post new topic
Reply to topic
|