How in php/mySQL can i make a column equal another column?
id is auto increment, xid should be unique. Can i make xid = id in SQL? (the reason for this is to log changes but i'll explain more if needed)
To make xid unique the best way is to copy the auto increment of id
+----+-----+----------+----------------+------+---------+
| id | xid | title | body | page | visible |
+----+-----+----------+----------------+------+---------+
| 1 | 1 | my title | my body | NULL | 1 |
| 2 | 2 | my title | my body edited | 1 | 0 |
+----+-----+----------+----------------+------+---------+
$queryX = "INSERT INTO table (xid, title, body, page, visible)
VALUES (, 'Plays', 'it's playing', 'book page', 1)";