file input box does not return image details in array in $this-data
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 this below [image] = Array ( [name] = foo.png [type] = image/png [tmp_name] = temp/path/to/store/a/file [size] = 56759 ) And because of it, i am unable to upload a photo yet. Why am i not getting above thing? Did i miss something? Please help 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.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: how to call Model1-find(all) from Model2 Controller
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.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Generate valid path like directory-name-where-the-file-exists/file-name in view
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 img tag through src attribute for some reason and i do not want to use the directory name where the file exists, hardcoded as the directory name might change in future. So i m looking for a better option. $html-link generates along with a tag. Please help... 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.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: DATE_FORMAT in fields does not return formatted date under proper Key (Model Name)
@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_STRING, expecting ')' :( 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.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: DATE_FORMAT in fields does not return formatted date under proper Key (Model Name)
@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( User.first_name, User.middle_name, User.last_name, ), )); returns, [User] = Array ( [first_name] = foo [middle_name] = bar [last_name] = bar ) 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.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: DATE_FORMAT in fields does not return formatted date under proper Key (Model Name)
@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.created, '%d') AS User.created, `User`.`mobile`, `User`.`dob`, `User`.`experience` FROM `users` AS `User` LEFT JOIN `gender_salutations` AS `GenderSalutation` ON (`User`.`gender_salutation_id` = `GenderSalutation`.`id`) WHERE `User`.`email` = 'amit.2006...@gmail.com'LIMIT 1 SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.created Any other solution... please help 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.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
DATE_FORMAT in fields does not return formatted date under proper Key (Model Name)
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-User-find(first, array( conditions = array(User.email = $this-Session-read (email)), fields = array( GenderSalutation.name, User.first_name, User.middle_name, User.last_name, DATE_FORMAT(User.created, '%d') AS created, User.dob, ), )); which returns: Array ( [GenderSalutation] = Array ( [name] = Mr. ) [User] = Array ( [first_name] = foo [middle_name] = bar [last_name] = foo [dob] = 1985-10-29 19:13:29 ) [0] = Array ( [created] = 13 ) ) I want [created] = 13 in [User] key. What do i do? please help... 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.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en