I think that cake have SelectBySql()
it's works at mssql I think that will work at mysql ...
SELECT first_name + last_name as full_name from my table?
Olivier Percebois-Garve escreveu:
Well if it is mysql specific you could use DESCRIBE.
With that you could then get the fieldname in the table and play with
them in order to find first_ and last_
olivvv
John Zimmerman [gmail] wrote:
This is more of a MySQL question than a CakePHP question,
but I thought I would ask here first.
I did a little bit of searching on this but can't find any decent leads
to the answer so far. I am hoping someone here just knows, as I don't
know exactly how to refer to what I am trying to do.
I am working with PHP 5, MySQL 5 and CakePHP 1.1.4.x.
What I would like to know is this....
Is
it possible to have a "virtual" or "composite" type field in MySQL that
is basically two other fields put together? AND if this feature exists
in MySQL is it useable with CakePHP?
A simplistic example of this would be that in a table called 'users' I
would have fields of 'first_name' and 'last_name'. What I would like
to do is to be able to query for 'name' and get
"first_name"."last_name".
So basically...
- first_name = John
- last_name = Zimmerman
- when I query for 'name' I want to get "John Zimmerman"
Any help is appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
|