PHPBB3 - Get row from insert statement
문제
When using $db->sql_query
in PHPBB3, how would I get the id of a row created with an insert
statement?
해결책
다른 팁
in phpBB3 you get an even better way, the dbal go a function for this: $db->sql_nextid():
$sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $user_ary);
$db->sql_query($sql);
$user_id = $db->sql_nextid();
제휴하지 않습니다 StackOverflow