Ejemplo para blogs: blogTable


Tabla de blogs que incluye entradas y autores:

Ejemplo de la clase:
classes/tables.class.php
class autorTable extends Table {
  function autorTable() {
    $this->Table('autor');
    $this->key = 'idautor';
    $this->title = 'Autores';
    $this->maxrows = 10;
    $this->order = 'idautor';
    $this->addColumn('idautor','serial',0,1,0,'Id');
    $this->addColumn('autor','varchar',500,0,0,'Autor');
    $this->addColumn('email','varchar',150,0,0,'E-mail');
  }
}

class blogTable extends Table {
  function blogTable() {
    $this->Table('blog');
    $this->key = 'idblog';
    $this->title = 'Blogs';
    $this->maxrows = 10;
    $this->order = 'idautor';
    $this->addColumn('idblog','serial',0,1,0,'Id');
    $this->addColumn('idautor','int',0,0,'autor','Autor');
    $this->addColumn('fecha','date',0,0,0,'Fecha');
    $this->addColumn('blog','varchar',500,0,0,'Titulos');
    $this->addColumn('texto','text',0,0,0,'Texto');
  }
}



CategoryEjemplos
Comments [Hide comments/form]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki