database - Joomla 1.7 creating component for backend using multiple talbes and editing multiple fields ask for suggestion -
database - Joomla 1.7 creating component for backend using multiple talbes and editing multiple fields ask for suggestion -
for joomla 1.7, have 3 tables database. display manufacturers backend component com_manufacturers database has columns:
id, name, address
i trying have each name link connect table called 'hours'to display edit page particular id. 'hours' table has columns defined as:
hour_id, hour_manufacturerid {fk}, hour_dayofwork, hour_open, hour_close
in models , views folder, have done display list. connect hours table next?
in models/manufacturers.php , have class extends jmodellist. tables folder has job connect database, in models/....php dbo(). views has display list of manufacturers. how particular link move url
?option=com_manufacturers&views=hours&id=1
on first name, id=2 , id=3 ?
after create models/manufacturer.php , views/manufacturer/tmpl/default.php , view.html.php --> tried have models connect table 'hours' create different task can't create these 2 connect. can't send 1 id page edit info of new table matching id=hour_id. suggestion?
i prefer not bring together table. way connect database 1 table, link other, , having view displaying particular id match edit.php page? miss something? new joomla component , begin code php year now.
thanks suggestion.
ps. if not much, how edit many fields @ once? dayofwork field sun-mon. has openhour, closehour it. idea?
========================== [edit]
down vote accept
now, in list of manufacturers, have assigned tag link ..?option=com_manufacturer&task=manufacturer.edit&hour_id=1" [id=2, id=3 etc.] lastly night able that, however, purpose create link go edit page of model connect different table in database.
so edit page supposed connected edit page in [ models; models/manufacturer.php has view in views/manufacturer/tmpl/edit.php : , ..view.html.php ]
again, models/manufacturer.php supposed connect new database table name 'hours' grab info id = hour_manufacturerid { id -> table 'manufacturer' , hour_manufacturerid -> table 'hours' in database}
is possible pass value $id have match in edit page particular hour_manufactuerid ? if is, , should start have status match or connection of two?
right .xml file show form input, existing info previous [the info manufacturer list should send 1 list @ time] doesn't seem go ( of course, don't have connection anywhere go )
thanks!
database model-view-controller joomla components
Comments
Post a Comment