mysql - SQL PHP INSERT INTO tables -
is possible insert multiple tables this?
select first_name, last_name, feet, inche, weight, dob, college, pob, experience, cy, py player inner join attribute on player.pid = attribute.pid inner join history on player.pid = history.pid inner join salary on player.pid = salary.pid
how join tables for:
if(!($stmt = $mysqli->prepare("insert player(first_name, last_name) values (?, ?)"))){ echo "prepare player failed: " . $stmt->errno . " " . $stmt->error; } if(!($stmt->bind_param("ss", $_post['first_name'],$_post['last_name']))){ echo "bind failed: " . $stmt->errno . " " . $stmt->error; }
mysql doesn’t support insert multiple tables via single insert statement, believe oracle support it.
but can use transaction
make sure insert statements execute via single transaction.
Comments
Post a Comment