PE
|
Posted: 01/31/2005, 5:16 PM |
|
In a form I have a an input parameter: organisation_id
And a field called with a field properties list (joined tabel) like this:
SELECT artikel_id,titlename FROM articles WHERE organisation=get_param(organisation_id)
it preselects from a list of titlenames of the tabel 'articles' and should only give back those with the right organisation_id of the form input parameter (passed on from another page).
But I get syntax errors, something is wrong with this part: WHERE organisation=get_param(organisation_id)
Any ideas?
|
|
|
aakici
Posts: 49
|
Posted: 01/31/2005, 5:26 PM |
|
When writing this sql (because organizsation id is a input parameter) if organisation_id is a textbox, or listbox (control, etc) you must write like this.
$Sql="SELECT artikel_id,titlename FROM articles WHERE organisation=".CCToSql($formname->organisation_id->GetValue(), ccsInteger);
If you give details i can write sql to you.
_________________
Regards,
M.Alpaslan AKICI |
|
|
PE
|
Posted: 02/01/2005, 2:52 AM |
|
I already discovered what I it should look like!
This works:
SELECT artikel_id,titlename FROM articles WHERE organisation=".get_param("organisation_id")."
Thanks for the help
|
|
|
Nicole
Posts: 586
|
Posted: 02/01/2005, 2:58 AM |
|
PE,
Just a notice. You discovered the valid CC syntax, but you posted the topic to CCS forum, that’s why you was provided with proper CCS syntax.
_________________
Regards,
Nicole |
|
|
PE
|
Posted: 02/01/2005, 5:08 AM |
|
I know, but I get far more attention here, the CC groups are badly read.
And since I want to step over to CCS one day (if I get myself to that big step) I collect all the possible answers to my questions...
I notice that there are more people here with this approach!
|
|
|
|