grigri,
You really really save my day. Thanks a lot!
Cheers,
mbavio
On 16 abr, 06:23, Grzegorz Pawlik [EMAIL PROTECTED] wrote:
grigri said:
You can also use {1} {2} as the format string instead of the
sprintf() format, if you like. Personally I prefer the sprintf
format...
Yeah, but if
grigri said:
You can also use {1} {2} as the format string instead of the
sprintf() format, if you like. Personally I prefer the sprintf
format...
Yeah, but if You have something like:
Array
(
[0] = Array
(
[Company] = Array
(
[name] =
this helped me too ! thanks grigri
PS: If you have some time quote this simple example in http://book.cakephp.org/
, I'm too new entry to explain the example.
On Feb 11, 10:41 am, grigri [EMAIL PROTECTED] wrote:
find('list') only works with simple fields, you won't be able to do
this.
Anyone who knows why your Favorites doesn't get stored in your
Favorites-link at the top? Can't delicious everything..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email
Ohh,
I didn't even notice the grouping by letters. Extremely cool...nice.
On Feb 11, 2008 11:17 AM, grigri [EMAIL PROTECTED] wrote:
'{n}.User.surname.0' ???
Why the .0 at the end?
To get the first letter. Strings are treated as arrays and can be
indexed, so if $var = Hello then
'{n}.User.surname.0' ???
Why the .0 at the end?
To get the first letter. Strings are treated as arrays and can be
indexed, so if $var = Hello then $var[0] = H;
Correction to what I said above: using format arrays only works for
keyPath and valuePath, NOT for groupPath (hence the workaround
EXTREMELY NEAT!! (please excuse my excitement :D )
Just one thing in the complicated example
'{n}.User.surname.0' ???
Why the .0 at the end?
--
Baz L
Web Development 2.0
http://WebDevelopment2.com/
On Feb 11, 2008 11:10 AM, Samuel DeVore [EMAIL PROTECTED] wrote:
grigri, can you write
there is the start of some information on Set:: at
http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-for-breakfast/
Sam D
On Feb 11, 2008 9:04 AM, Baz [EMAIL PROTECTED] wrote:
Are you serious?
Ok, you guys need a Set::combine tutorial or something!
I've been trying
Are you serious?
Ok, you guys need a Set::combine tutorial or something!
I've been trying to figure this out how to combine fields for a few months
now. I've been reduced to creating a custom array in a foreach loop.
But I knew, deep down inside, there must be way. ThanX
--
Baz L
Web
grigri, can you write up some of this and send to John for the
documentation project, this has got to get in there.
Sam D
On Feb 11, 2008 10:06 AM, grigri [EMAIL PROTECTED] wrote:
It's easy, really - for each of the 3 fields (keyPath, valuePath and
groupPath), instead of passing a string,
It's easy, really - for each of the 3 fields (keyPath, valuePath and
groupPath), instead of passing a string, you can pass an array.
The first entry in the array is the format string, the rest are the
parameters (extracted with Set::extract()).
The format is exactly the same as sprintf() [it
Hello cakephp friends,
I have 2 tables. Communications and people. In communications/add i
want a list where you can choose one person from table people. But you
don't see his name, only his ID. I have these fields in table people:
id
firstname
insertion
surname
Can someone help me to make a
find('list') only works with simple fields, you won't be able to do
this.
Still, it's easy enough with find('all') and Set::combine():
$people = $this-Person-find('all', array(
'fields' = array('id', 'firstname', 'insertion', 'surname'),
'recursive' = -1
));
$list = Set::combine(
$people,
It works, thank you very much!
Now i'm gonna try to make a function to combine the two functions :)
On 11 feb, 10:41, grigri [EMAIL PROTECTED] wrote:
find('list') only works with simple fields, you won't be able to do
this.
Still, it's easy enough with find('all') and Set::combine():
Yeah, I've seen that a lot.
What I was referring to with grigri's example is that :
array(%s %s %s) thing for the path...
I have tons of examples like these where I need to do a $firstname -
$lastname type of thing.
On Feb 11, 2008 10:22 AM, Samuel DeVore [EMAIL PROTECTED] wrote:
there is
Hey Baz. Until we have proper docs, the best place to look is the
test cases. The Set class has some pretty good usage examples there.
'{n}.User.surname.0' ???
Why the .0 at the end?
To get the first letter. Strings are treated as arrays and can be
indexed, so if $var = Hello
16 matches
Mail list logo