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

phpMyEdit General     Once again: Drop down
Odoslať novú tému   Odpovedať na tému    
 
Silberdrache     Založený: 08.09.2006   Príspevky: 7  
Príspevok Zaslal: 2006-09-13 15:00
Návrat hore  Odpovedať s citátom     

Hello,

although I've been searching the forum for hours
I could not find a working solution:

I created a formular for a table to alter it's data.
One of the formular-fields should be a drop-down
which values should come from another table.
So I have to access two tables within one formular.

Is there any example available how to to this ?

 
Silberdrache     Založený: 08.09.2006   Príspevky: 7  
Príspevok Zaslal: 2006-09-14 11:13
Návrat hore  Odpovedať s citátom     

I tried exactly the same example as shown here:
http://opensource.platon.sk/forum/projects/viewtopic.php?t=455

I created the two tables and used the provided code,
but all I get is:

MySQL error 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-acap.tableb AS PMEjoin2 ON PMEjoin2.B_ID = PMEtable0.B_ID' at l" (where "admin-acap" is the name of my DB).

The query looks like this:

SELECT PMEtable0.A_FD1 AS qf0,PMEtable0.A_FD2 AS qf1,PMEjoin2.B_FD2 AS qf2,PMEtable0.B_ID AS qf2_idx,PMEtable0.A_FD1 FROM tablea AS PMEtable0 LEFT OUTER JOIN admin-acap.tableb AS PMEjoin2 ON PMEjoin2.B_ID = PMEtable0.B_ID LIMIT 0,151

I am using the latest 5.5. All the time when I try
to lookup multiple tables I get MySQL errors.

Could please someone try the example above with
5.5 and tell me if it's working ?

 
Silberdrache     Založený: 08.09.2006   Príspevky: 7  
Príspevok Zaslal: 2006-09-14 12:59
Návrat hore  Odpovedať s citátom     

I found out what the problem is:

The "-" in the database name. Have a look at:
http://dev.mysql.com/doc/mysql/en/legal-names.html

I don't know how to solve yet, but the problem is
clear because with database name "acap" everthing
is working fine.

Now even the dropdown is working perfectly.

 
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