Jump to content
Larry Ullman's Book Forums

buggy

Members
  • Posts

    1
  • Joined

  • Last visited

buggy's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I'm quite new in PHP and Yii, so any help will be much appreciated. I have table in DB which represents routes, each route, one row. One of attributes is spatial mysql datatype "MULTIPLEPOINT". I would try to keep all points in the same table/row as route itself, rather then creating child table for points. I don't know how to handle it in the Yii Model file. After creating model with the help of gii, 'points' attribute is of course not handled. Should I have child class for points, although I don't have corresponding database table for points, or I should just manually add some array of points in the route class/model ? Table structure is something like this: CREATE TABLE IF NOT EXISTS `Route` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `userId` int(10) unsigned NOT NULL, `routeName` varchar(32) NOT NULL, `routeDescription` varchar(128) NOT NULL, `points` multipoint DEFAULT NULL, PRIMARY KEY (`id`), KEY `userId` (`userId`) );
×
×
  • Create New...