Silver
|
| Posted: 08/24/2002, 3:17 AM |
|
I always get " Fatal Error: undefined function" when I use any CCS function within an after insert event. for example: ToSQL , or Query are not working and always giving me undefined function.
Can anybody help me please?
|
|
|
 |
Nicole
|
| Posted: 08/24/2002, 3:39 AM |
|
Silver,
it seems to me that you tied to use non-existing function. All available CCS functions are listed in common.* file
Use CCToSQL()
and
CCExecQuery()
|
|
|
 |
Silver
|
| Posted: 08/25/2002, 10:23 AM |
|
Thanks Nicole..I think the problem was that I used to write:
$members->query($sql);
the correct is :
$members->ds->query($sql);
put please can you explain when do I use ds? I know thus seems to be an esy thing but I'm still new to this.
Thanks again
|
|
|
 |
Nicole
|
| Posted: 08/27/2002, 4:21 AM |
|
Silver,
use $form_name->ds for "action" events (which are executed after form submit: onValidate, Before Insert, After Insert, Before Build Update, etc.). Use $form_name-> in "show" events (which are executed when the form is loading: Before Show, Before Build Select, After Execute Select, etc.).
The other way is to open new connection. E.g.:
$conn = new clsDBconnetion_name;
$conn->query("custom_query");
|
|
|
 |
Silver
|
| Posted: 08/27/2002, 5:46 AM |
|
I really thank you Nicole..this is working too.
You are wonderful.
|
|
|
 |
|