Xavier
|
| Posted: 05/08/2002, 9:18 AM |
|
Hello,
can anyone please help me with this error I get after inserting a record
Warning: Wrong parameter count for date() in /path_name/page_name on line
322
Thanks
Xavier
|
|
|
 |
Barry G. Sumpter
|
| Posted: 05/08/2002, 12:43 PM |
|
can you track down the script that producing this error and
show up the reoutine?
baz
"Xavier" <nobody@nowhere.invalid> wrote in message
news:abbj59$l00$1@news.codecharge.com...
> Hello,
> can anyone please help me with this error I get after inserting a record
>
> Warning: Wrong parameter count for date() in /path_name/page_name on line
> 322
>
> Thanks
> Xavier
>
>
>
|
|
|
 |
Xavier
|
| Posted: 05/09/2002, 12:22 AM |
|
"Barry G. Sumpter" <bsumpter@bigpond.net.au> ha scritto nel messaggio
news:abbv50$d9p$1@news.codecharge.com...
> can you track down the script that producing this error and
> show up the reoutine?
>
> baz
Here you are. Line that produces the error first is
$fldrichiesto_il=Date();
date field in db is defined as a timestamp (pgsql)
thanks for help
//-------------------------------
// Load all fields into variables from recordset or input parameters
//-------------------------------
if($bIsUpdateMode)
{
$fldid = $db->f("id");
$fldrichiesto_da = $db->f("richiesto_da");
$fldrichiesto_il = $db->f("richiesto_il");
//-------------------------------
// Load data from recordset when form displayed first time
//-------------------------------
if($sUIRecErr == "")
{
$fldarea_interv = $db->f("area_interv");
$fldsoggetto = $db->f("soggetto");
$flddescr = $db->f("descr");
$fldstato_id = $db->f("stato_id");
$fldallegato1 = $db->f("allegato1");
$fldallegato2 = $db->f("allegato2");
$fldallegato3 = $db->f("allegato3");
$fldallegato4 = $db->f("allegato4");
}
$tpl->set_var("UIRecDelete", "");
$tpl->set_var("UIRecInsert", "");
$tpl->parse("UIRecEdit", false);
//-------------------------------
// UIRec ShowEdit Event begin
// UIRec ShowEdit Event end
//-------------------------------
}
else
{
if($sUIRecErr == "")
{
$fldrichiesto_il=Date();
$fldrichiesto_da=get_session("UserID");
}
$tpl->set_var("UIRecEdit", "");
$tpl->parse("UIRecInsert", false);
//-------------------------------
// UIRec ShowInsert Event begin
// UIRec ShowInsert Event end
//-------------------------------
}
$tpl->parse("UIRecCancel", false);
//-------------------------------
|
|
|
 |
Webmaster
|
| Posted: 05/09/2002, 8:16 PM |
|
Change to this
$fldrichiesto_il=Date('Y-m-d');
This should fix the problem. Please refer to php manual for different
formats for Date function.
"Xavier" <nobody@nowhere.invalid> wrote in message
news:abd83u$msm$1@news.codecharge.com...
>
> "Barry G. Sumpter" <bsumpter@bigpond.net.au> ha scritto nel messaggio
>news:abbv50$d9p$1@news.codecharge.com...
> > can you track down the script that producing this error and
> > show up the reoutine?
> >
> > baz
>
> Here you are. Line that produces the error first is
> $fldrichiesto_il=Date();
>
> date field in db is defined as a timestamp (pgsql)
> thanks for help
>
>
>
> //-------------------------------
> // Load all fields into variables from recordset or input parameters
> //-------------------------------
> if($bIsUpdateMode)
> {
> $fldid = $db->f("id");
> $fldrichiesto_da = $db->f("richiesto_da");
> $fldrichiesto_il = $db->f("richiesto_il");
> //-------------------------------
> // Load data from recordset when form displayed first time
> //-------------------------------
> if($sUIRecErr == "")
> {
> $fldarea_interv = $db->f("area_interv");
> $fldsoggetto = $db->f("soggetto");
> $flddescr = $db->f("descr");
> $fldstato_id = $db->f("stato_id");
> $fldallegato1 = $db->f("allegato1");
> $fldallegato2 = $db->f("allegato2");
> $fldallegato3 = $db->f("allegato3");
> $fldallegato4 = $db->f("allegato4");
> }
> $tpl->set_var("UIRecDelete", "");
> $tpl->set_var("UIRecInsert", "");
> $tpl->parse("UIRecEdit", false);
> //-------------------------------
> // UIRec ShowEdit Event begin
> // UIRec ShowEdit Event end
> //-------------------------------
> }
> else
> {
> if($sUIRecErr == "")
> {
> $fldrichiesto_il=Date();
> $fldrichiesto_da=get_session("UserID");
> }
> $tpl->set_var("UIRecEdit", "");
> $tpl->parse("UIRecInsert", false);
> //-------------------------------
> // UIRec ShowInsert Event begin
> // UIRec ShowInsert Event end
> //-------------------------------
> }
> $tpl->parse("UIRecCancel", false);
> //-------------------------------
>
>
>
|
|
|
 |
|