AaronJ
|
| Posted: 03/07/2003, 11:08 AM |
|
In the before show row event of an update grid, I am trying to replace the
original rows retreieved values with some new values, and wish to present
these new values in the row. This is in CCS2 Beta 3, btw. Although all the
data IS being returned by the query, the only value that is being replaced
on the row/template view is the PRICE value. Strangely, this one only
started working while I was writing this email and double checking all the
scenarious (I have tried assign the fields to variables first, and also
using SetVar-same results).
Anyone have any idea what I am doing wrong (a day gone so far.. getting
frustrated at myself!).. .OR-- is this a bad bug?
Thanks -- Aaron
Exact code below (except source of localcopy variable):
//Custom Code @70-2A29BDB7
// -------------------------
global $item_data_items_netadmin;
global $Tpl;
$db = new clsDBcsp_database();
$db->query("select
price,availability,beginshowdate,endshowdate,beginsaledate,endsaledate,salep
rice,isvisible,priority from item_data where item_data_id=".$localcopy."");
// Returns : '69.95','0','2002-10-01 00:00:00','2003-10-31
00:00:00','2002-10-01 00:00:00','2002-12-15 00:00:00','49.95','1','10'
while($db->next_record())
$item_data_items_netadmin->price->SetValue($db->f(price));
$item_data_items_netadmin->availability->SetValue($db->f(availability));
$item_data_items_netadmin->endshowdate->SetValue($db->f(endshowdate));
$item_data_items_netadmin->beginshowdate->SetValue($db->f(beginshowdate));
$item_data_items_netadmin->beginsaledate->SetValue($db->f(beginsaledate));
$item_data_items_netadmin->endsaledate->SetValue($db->f(endsaledate));
$item_data_items_netadmin->saleprice->SetValue($db->f(saleprice));
$item_data_items_netadmin->isvisible->SetValue($db->f(isvisible));
}
$db->close();
|
|
|
 |
Lee Irving
|
| Posted: 03/11/2003, 8:50 AM |
|
Aaron,
I tried to reply to you through codecharges.com but it seems to be giving me
problems at the mo.
Instead of using beginshowdate in your select try
UNIX_TIMESTAMP(beginshowdate) as beginshowdate
Your Date formats should then work
Regards
Lee
"AaronJ" <aaronjudd@coolersites.com> wrote in message
news:b4aqnl$tqv$1@news.codecharge.com...
> In the before show row event of an update grid, I am trying to replace the
> original rows retreieved values with some new values, and wish to present
> these new values in the row. This is in CCS2 Beta 3, btw. Although all the
> data IS being returned by the query, the only value that is being replaced
> on the row/template view is the PRICE value. Strangely, this one only
> started working while I was writing this email and double checking all the
> scenarious (I have tried assign the fields to variables first, and also
> using SetVar-same results).
>
> Anyone have any idea what I am doing wrong (a day gone so far.. getting
> frustrated at myself!).. .OR-- is this a bad bug?
>
> Thanks -- Aaron
>
> Exact code below (except source of localcopy variable):
>
> //Custom Code @70-2A29BDB7
> // -------------------------
> global $item_data_items_netadmin;
> global $Tpl;
> $db = new clsDBcsp_database();
> $db->query("select
>
price,availability,beginshowdate,endshowdate,beginsaledate,endsaledate,salep
> rice,isvisible,priority from item_data where
item_data_id=".$localcopy."");
> // Returns : '69.95','0','2002-10-01 00:00:00','2003-10-31
> 00:00:00','2002-10-01 00:00:00','2002-12-15 00:00:00','49.95','1','10'
>
> while($db->next_record())
>
>
> $item_data_items_netadmin->price->SetValue($db->f(price));
>
> $item_data_items_netadmin->availability->SetValue($db->f(availability));
>
> $item_data_items_netadmin->endshowdate->SetValue($db->f(endshowdate));
>
> $item_data_items_netadmin->beginshowdate->SetValue($db->f(beginshowdate));
>
> $item_data_items_netadmin->beginsaledate->SetValue($db->f(beginsaledate));
>
> $item_data_items_netadmin->endsaledate->SetValue($db->f(endsaledate));
>
> $item_data_items_netadmin->saleprice->SetValue($db->f(saleprice));
>
> $item_data_items_netadmin->isvisible->SetValue($db->f(isvisible));
> }
> $db->close();
>
>
>
|
|
|
 |
|