Cita:
supuce que era en el controlador en 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 'FindAll' at line 1 [CORE\cake\libs\model\datasources\dbo_source.php, line 673]
Código PHP:
<?php
class ArtistasController extends AppController
{
var $name='Artistas';
function index(){
$this->set('artistas',$this->Artista->findAll());
}
function add(){
if (!empty($this->data)){
if ($this->Artista->save($this->data)){
$this->flash('El artista se ha guardado correctamente.','/artista');
}
}
}
}
en esta linea
Cita:
si le quito el findAll() no me sale este error pero tampoco me muestra la consulta alguien sabe xq sera esto??$this->set('artistas',$this->Artista->findAll());
saludos