Simon Chee
|
| Posted: 06/15/2002, 3:03 PM |
|
Has anyone got an example of using event code to insert records in
CodeChargeStudio?
I've got an old CodeCharge example but haven't been able to work out how to
do it with the object PHP coding used by CCS?
I want to insert some records in the afterinsert event of a record page.
:)
|
|
|
 |
Sean
|
| Posted: 06/15/2002, 7:21 PM |
|
Hello Simon,
Have you tried using the CCExecSQL function? It's form looks like this from
the Help file: CCExecSQL(SQL, Connection, ShowError). Where SQL is the Query
to execute, Connection is the ADODB.Connection or clsDB<name> object and
ShowError is a flag to return a descriptive error or not. Found in
Common.php
"Simon Chee" <darkblade@darkblade.fslife.co.uk> wrote in message
news:aegdjs$217$1@news.codecharge.com...
> Has anyone got an example of using event code to insert records in
> CodeChargeStudio?
>
> I've got an old CodeCharge example but haven't been able to work out how
to
> do it with the object PHP coding used by CCS?
>
> I want to insert some records in the afterinsert event of a record page.
>
> :)
>
>
|
|
|
 |
Simon Chee
|
| Posted: 06/16/2002, 9:59 AM |
|
Cheers Sean,
But that function does not exist for PHP!
I think I need to use the query and sql functions of the object clsDB<>.
Something like
$clsRsltDb = new clsDBLeague
$clsRsltDb->SQL("blah blah blah");
$clsRsltDb->query
"Sean" <smroe@bak.rr.com> wrote in message
news:aegsnk$vuo$1@news.codecharge.com...
> Hello Simon,
>
> Have you tried using the CCExecSQL function? It's form looks like this
from
> the Help file: CCExecSQL(SQL, Connection, ShowError). Where SQL is the
Query
> to execute, Connection is the ADODB.Connection or clsDB<name> object and
> ShowError is a flag to return a descriptive error or not. Found in
> Common.php
>
> "Simon Chee" <darkblade@darkblade.fslife.co.uk> wrote in message
>news:aegdjs$217$1@news.codecharge.com...
> > Has anyone got an example of using event code to insert records in
> > CodeChargeStudio?
> >
> > I've got an old CodeCharge example but haven't been able to work out how
> to
> > do it with the object PHP coding used by CCS?
> >
> > I want to insert some records in the afterinsert event of a record page.
> >
> > :)
> >
> >
>
>
|
|
|
 |
lukas rueegg
|
| Posted: 06/19/2002, 4:28 AM |
|
hi simon
you're right with your answer. i did it like this:
$results_ds = new clsDB[connection]();
$results_ds->query("SQL");
regards
lukas.
"Simon Chee" <darkblade@darkblade.fslife.co.uk> wrote in message
news:aegdjs$217$1@news.codecharge.com...
> Has anyone got an example of using event code to insert records in
> CodeChargeStudio?
>
> I've got an old CodeCharge example but haven't been able to work out how
to
> do it with the object PHP coding used by CCS?
>
> I want to insert some records in the afterinsert event of a record page.
>
> :)
>
>
|
|
|
 |
|