Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Array
- (
- [0] => Array
- (
- [AdoPosition] => Array
- (
- [name] => Sahbaj
- )
- )
- [1] => Array
- (
- [AdoPosition] => Array
- (
- [name] => test-name
- )
- )
- )
- $name = $this->AdoPosition->find('all',
- array(
- 'fields'=>'AdoPosition.name',
- 'group'=>'AdoPosition.name'
- ));
- pr($name);
- $name = $this->AdoPosition->find('list', array(
- 'fields' => array('AdoPosition.name', 'AdoPosition.name'),
- 'group' => array('AdoPosition.name')
- ));
- $name = implode(',', $name);
- "Sahbaj,test-name"
- $data = $this->AdoPosition->query('SELECT GROUP_CONCAT(DISTINCT name) from your_table_name;');
- $result = implode( ",", Set::classicExtract($name, '{n}.AdoPosition.name'));
- echo $result; // Sahbaj,test-name
- $names=Set::extract("/AdoPosition/name",$array);
- $names = $this->AdoPosition->find('list', array('fields'=>array('name')));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement