ziostanko Posted September 28, 2012 Share Posted September 28, 2012 (edited) $sql = 'SELECT * FROM '._DB_PREFIX_.'customer WHERE id_customer = $customer'; if ($row = Db::getInstance()->getRow($sql)) $genderid=$row['id_gender']; -> ok $name=$row['firstname']; -> ok $lastname=$row['lastname']; -> ok $birthday=$row['birthday']; -> NOT WORKING o_O i cannot extract data field from db... where is my mistake? anyone could help me pleaze? Thank you zio Edited September 28, 2012 by ziostanko (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 28, 2012 Share Posted September 28, 2012 (edited) $sql = 'SELECT * FROM '._DB_PREFIX_.'customer WHERE id_customer = $customer'; if ($row = Db::getInstance()->getRow($sql)) $genderid=$row['id_gender']; -> ok $name=$row['firstname']; -> ok $lastname=$row['lastname']; -> ok $birthday=$row['birthday']; -> NOT WORKING o_O i cannot extract data field from db... where is my mistake? anyone could help me pleaze? Thank you zio I know this is a stupid question ... but you are you sure that this row is not empty in database? Edited September 28, 2012 by vekia (see edit history) Link to comment Share on other sites More sharing options...
ziostanko Posted September 28, 2012 Author Share Posted September 28, 2012 (edited) yes i'm sure expacially the birthday field has data in it.... i use this query to extract data on ActionCustomerAccountAdd hook beacuse context birthday ($this->context->customer->birthday) variable has a different date format: context: 1978-3-12 database: 1978-03-12 i need database date field format Edited September 28, 2012 by ziostanko (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts