My initial example's model is looking like controller.Probably i shoold make separate model class for every table from the sql.I can't belive that there is no example in the net.
My view and controller are not like they should be, but i don't know how to connect them in the shown example.