CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Custom SQL-Query with parameters and PHP

Print topic Send  topic

Author Message
Markus Dollinger
Posted: 08/20/2001, 5:51 AM

Hallo!

I would like to use a custom SQL-query with parameters like (simple)
SELECT * FROM xyz WHERE ID=$someparameter

May somebody tell me how to do this with CC and PHP?
My Solution provides an sql-errormessage but the generated site works:

SELECT * FROM t20_produkte WHERE PID=".get_param("PID")."

But with this statement, CC offers me no fields because of the error ...

THX
Markus

Markus Dollinger
Posted: 08/20/2001, 6:20 AM

Markus Dollinger <dollinger@web.de> wrote in
news:Xns91039761AC266dollingerwebde@206.170.14.140:

> I would like to use a custom SQL-query with parameters like (simple)
> SELECT * FROM xyz WHERE ID=$someparameter
>
> May somebody tell me how to do this with CC and PHP?
> My Solution provides an sql-errormessage but the generated site works:
>
> SELECT * FROM t20_produkte WHERE PID=".get_param("PID")."
>
> But with this statement, CC offers me no fields because of the error ...

I have found a solution: just add singlequotes around the get_param e.g.

'" . get_param("someparam") . "'

Markus

   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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