my problem is , i have a database design from this link http://stackoverflow.com/questions/3305825/is-my-database-overdesigned
edit* ok maybe useing transaction ? but where should i put the rollback if it fails ?
$dbConnect->beginTransaction();
$RegisterInsert = $dbConnect->prepare("INSERT INTO companies (
`name`, `address`, `email`, `phone`, `link`, `verified`) VALUES (
:name, :address, :email, :phone, :link, :verified)");
$RegisterInsert->execute($RegisterData);
$RegisterData2['CID'] = $dbConnect->lastInsertId();
$RegisterInsert = $dbConnect->prepare("INSERT INTO users_companies (
`UID`, `CID`, `role`) VALUES (
:UID, :CID, :role)");
$RegisterInsert->execute($RegisterData2);
$dbConnect->commit();
where should i put the rollback ?
Thanks