i have a file input box to attach user's photo using e($form->file
('User.photo'));
but when i post form, i get following array,
Array
(
[User] => Array
(
[photo] => foo.png
)
)
instead i should get the image details regarding image name, type,
tmp_name, size like t
i tried adding image using following code. below code generates
"directory-name/add-more.png" path.
e($html->image("add-more.png"));
I want to add above image using tag through src attribute for
some reason and i do not want to use the directory name where the file
exists, hardcoded as the direct
thx guys. Finally, it worked :)
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.c
@Amit Rawat: oh, silly mistake. I really need to keen my
observation ;)
var $virtualFields = array(
'full_name' => 'CONCAT(User.first_name, "", User.last_name)'
);
but the full_name key is not coming in
$arrUser = $this->User->find("first", array(
"fields" => array(
@Walther: thx i knew, i would get a valid solution.
i tried upgrading my cakephp 1.2.5 to 1.3 alpha, but when i use below
code in User Model, error comes...
var $virtualFields = array(
'name' => 'CONCAT(User.first_name, ' ', User.last_name)'
);
syntax error, unexpected T_CONSTANT_ENCAPSED
@John Andersen: thx but there has to be a solution instead of
formatting in view file
@Azril Nazli: :-( no luck... it says, sql query error. here is the
below query:
SELECT `GenderSalutation`.`name`, `User`.`first_name`,
`User`.`middle_name`, `User`.`last_name`, `User`.`address`, DATE_FORMAT
(User
It already ate my 1+ hour to figure out the problem. I hope, i'll get
a help here...
User Table Structure:
id
gender_salutation_id
first_name
middle_name
last_name
dob
email
GenderSalutation table Structure:
id
name
I used below code to fetch the full name and formatted dob:
$arrUser = $this->Us