CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 session parameter in sql

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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!

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.