KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
$query = "INSERT INTO news VALUES (NULL, :param1 , :param2 )"; $stmt = $pdo->prepare($query); $params = array( "param1" => $p['title'], "param2" => $p['body'], ); $data = $stmt->execute($params); // here i would like get current inserted ID. Is possible? $id = $data->id ???? ; How can i make this?
Tags (comma-separated)
Save Edits
Cancel