Snippets tagged “primary-key”
2 snippets use this tag.
- How to get primary key of table?PHP
To get the primary key of a table in PHP, you can use the SHOW KEYS SQL statement to retrieve information about the keys (including the primary key) of a table.
- PHP/MySQL insert row then get 'id'PHP
To insert a row into a MySQL database table and get the id of the inserted row in PHP, you can use the mysqli_insert_id() function.