I'm hard for my idea to solve
// Create table
CREATE TABLE `Table1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(70) NOT NULL
PRIMARY KEY (`id`)
);
CREATE TABLE `Table2` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` int(10) NOT NULL,
`table1_id` int(10) NOT NULL,
PRIMARY KEY (`id`)
);
//Model Table1
class Table1 extends \Phalcon\Mvc\Model
{
public $id;
public $name;
}
//Model Table2
class Table1 extends \Phalcon\Mvc\Model
{
public $id;
public $name;
public $table1_id;
}
Controllers.... ?
Volt ?
How to get results in images https://colien.vn/anh.jpg
Thank you very much