php - sync the 2 tables for certain rows -
this question of possible , should try it?
i have 2 rows in table 1 named jobs , 1 named contacts (hope still me)
in jobs have following columns
typeofjob id name phone address budget due
in contacts have following columns
id name phone address
is there way sync 2 tables rows?
id name phone address
i ask make life lot easier me worried id might conflict
and happens if delete user contacts want deleted row
i new , learning if can answer me simplify answers great treat trying explain nan or something, on other hand might pick faster :)
what want id in 1 of columns id of row in table. so, add column contact_id
in jobs
table, under assumption each contact potentially spawn multiple jobs. can query it, such
select * `jobs` `contact_id` = 'whatever'
you use joins more complex , efficient work (remember, less trips database, better!).
Comments
Post a Comment