Title: mark manson models attract women through honesty 1 ebook mobi epub seduction written
Uploaded: 10 days ago
I have built this query in one of my controller methods.
$students = $this->Student->query("SELECT id,name FROM students WHERE id IN (SELECT student_id FROM groups_students WHERE group_id = '$id') ");
I have tested it and I know the SQL returns the correct data. In my view, it is being displayed with
I simply want it to print out the names of the possible students that can be selected, which is why I am selecting the name and id...however, within my multiple select box, it is printing out both the name and the id of the student, as well as the word "students" for some reason.
I want the data to be returned from SQL in this format....
//[id] => 'displayValue',
 => 'displayValue1',  => 'displayValue2',  => 'displayValue4',  => 'displayValue5',  => 'displayValue6',  => 'displayValue3',
This is how it returns data from
This is currently how the data is being formatted upon retrieval, according to the CakePHP documentation.
array( (int) 0 => array( 'students' => array( 'id' => '2', 'name' => 'evan teague', 'lesson_cost' => null, 'paid_lessons' => null, 'notes' => '', 'created' => '2013-11-21 13:35:17', 'modified' => '2014-01-13 22:31:14' ) ), (int) 1 => array( 'students' => array( 'id' => '3', 'name' => 'Andrew', 'lesson_cost' => null, 'paid_lessons' => null, 'notes' => '', 'created' => '2013-11-22 10:08:01', 'modified' => '2014-01-13 22:22:50' ) ), (int) 2 => array( 'students' => array( 'id' => '5', 'name' => 'evan2', 'lesson_cost' => null, 'paid_lessons' => null, 'notes' => '', 'created' => '2013-11-22 14:17:57', 'modified' => '2013-11-22 14:17:57' ) )
Any help on this would be appreciated.