[SOLVED] Array value of a date field NOT correct ??

receiptDate is the second field of this select. It’s a populated date field like 2013-02-19
making the echo of all field of array I see correctly the value except this field that show 0000-00-00 instead of 2013-02-19.
Have got any idea why only that field is not visible ? Have to change sintax for date fields ?

echo " receip_value " . {receip_value[0][1]}; ===> result is ==> 0000-00-00

$sql_receipt = “SELECT receiptID, receiptDate, officeID, memberID, depositor, vat_fiscal_code, balance, advance, valid_from, valid_to, description, amount, currencyID, exchange_rate, cash_swift_flag, projectID FROM receipts WHERE receiptID = [glo_receiptID]” ;

sc_lookup(receip_value,$sql_receipt);

$var_receiptID = {receip_value[0][0]};
$var_receiptDate = {receip_value[0][1]};
$var_memberID = {receip_value[0][3]};
$var_depositor = {receip_value[0][4]};
$var_balance = {receip_value[0][6]};
$var_advance = {receip_value[0][7]};

if ( empty($var_balance) )
{ $var_cashin_type = $var_advance ; }
else
{ $var_cashin_type = $var_balance ; }

$var_description = {receip_value[0][10]};
$var_amount = {receip_value[0][11]};
$var_currencyID = {receip_value[0][12]};
$var_exchange_rate = {receip_value[0][13]};
$var_cash_swift_flag = {receip_value[0][14]};
$var_projectID = {receip_value[0][15]};

echo " receip_value " . {receip_value[0][1]};

Many thanks
Giovannino

The copy and paste of record
receiptID receiptDate officeID memberID depositor vat_fiscal_code balance advance valid_from valid_to description amount currencyID exchange_rate cash_swift_flag projectID
Modifica Elimina 1 2013-02-19 1 1 PROVA FORNITORE
VIA ROMA 888
36100 TRISSINO (VI) 65465656646646 1 0 2013-03-26 NULL Pagamento fornitura picchetti gara 230.77 1 0.0000 0 0

Hi all,
I’ve just founded the error. It was on the glo_var [glo_receiptID] .
SOLVED