CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 PHP Howto Execute Custom Queries

Print topic Send  topic

Author Message
jannaton
Posted: 10/03/2002, 9:53 PM

I am using PHP and PostgreSQL and want to do a series of custom queries
at an onClick event, one example below.
I tried using the CCExecSQL function as below but kept geting the following error: Call to undefined function: ccexecsql()

CCExecSQL("UPDATE purchase SET customer_lastname = " & CCGetParam("s_lastname", "") & " WHERE customer_lastname = " & CCGetParam("s2_lastname", ""), DBconnection, false);

After checking the help I found that CCExecSQL is an ASP function and not
a PHP function.
So what is the equivalent in PHP?
Also tried ExecuteNonQuery but got:
Call to undefined function: executenonquery()

ExecuteNonQuery( "UPDATE purchase SET customer_lastname = 'whatever' WHERE customer_lastname = 'Brown'");

Nicole
Posted: 10/07/2002, 5:37 AM

Hello,
to execute custom queries, first of all create new db connection:
$conn= new clsDB<connection_name>;
then use query() function to execute query:
$conn->query("custom sql");
jannaton
Posted: 10/10/2002, 6:12 PM

Thanks for the response Nicole
I am new to CCS and php so please forgive my ignorance
So I can now exec a custom query at the end of the CCS gen .php file
But how do I do the same on button on_click event in the events.php
generated file, the same code doesn't seem to work.
In the put custom code here I put the code below. I tried declaring
the dbconn global also but no luck there either: what am i missing?

$dbconn = new clsDBjarrets_data();
$dbconn->query("<myquery>");

thanks in advance

   


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

MS Access to Web

Convert MS Access to Web.
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.