Computer Science, asked by chameli5808, 1 year ago

MySQL: Insert a row and get the content?

Answers

Answered by Jyotimodi
0

Something like...

INSERT INTO `items` (`item`, `number`, `state`)

(SELECT '3', `number`, `state` FROM `item_bug` WHERE `id`='3')

And then, get ID and execute a

SELECT * FROM `items` WHERE `id`='$id'

But using only one query.

Similar questions