IMPORT to ARRAY

João Ranito <[email protected]> Wed, 12 Mar 2008 10:09:07 +0000
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <[email protected]>
Hi all,

This is my 5th day of battle with mod_survey, and my first post here on=20
this group, and i want first of all, to congratulate all the people=20
involved on this project.

Long story short, my problem is this:

<IMPORT DBIDSN=3D"dbi:mysql:database=3Dtest" DBIUSER=3D"user" DBIPASS=3D"=
user" =20
DBITABLE=3D"places" VISIBLE=3D"yes">
    <ARRAY NAME=3D"place" FIELD=3D"place" />
    <ARRAY NAME=3D"p_cap" FIELD=3D"place_label" />
    <FILTER CRITERIA=3D"user_id=3D{$u_id$}" />
</IMPORT>

Running this, my Apache will say "500" after being told by MySQL to=20
check for the right syntax near '}'.

u_id is ok, i checked it. It has been submitted from the previous page,=20
and i can see it printed ok on this page as well.

When i replace the ARRAY by VARIABLE, i get the values of the first row=20
of that query, as expected, so VARIABLE works ok with {$u_id$}.

When i replace the {$u_id$} in the FILTER by, say 1, i get all the=20
results ok, filtered by that id. And yes, u_id is 1 on my tests...

So my guess is, there must be something wrong with the parsing of the=20
criteria on an array import. Could this be?

The real problem is, when it comes to Perl, my level of proficiency will=20
allow me to develop a complete "hello world" program (standard edition,=20
not even enterprise), which means, when it comes to Perl, i am totally=20
and utterly ignorant.

So i was wondering, could someone please help me to find out what is=20
wrong? is it my import? is there a way i can get those nice arrays and=20
put them into those cool LISTs on my survey so my users can gracefully=20
pick their place? that would be real nice...

My mod_survey is 3.5.2 stable running on Apache/2.2.4 (Ubuntu)=20
mod_python/3.3.1 Python/2.5.1 PHP/5.2.3-1ubuntu6.3 mod_perl/2.0.2=20
Perl/v5.8.8 Server at 10.0.1.90 Port 80

Thanks to everyone and,
Greetings from Portugal(*)

Jo=E3o Ranito.
(*) Yes, mod_survey has come to the sunniest side of Europe ;)



Skickat av =3D?ISO-8859-1?Q?Jo=3DE3o_Ranito?=3D <[email protected]>
till survey-discussion