Username: Posted January 9, 2012 Share Posted January 9, 2012 Is this possible? I want ids to auto-increment over two tables. Link to comment https://forums.phpfreaks.com/topic/254647-sql-child-tables/ Share on other sites More sharing options...
Username: Posted January 9, 2012 Author Share Posted January 9, 2012 Didn't edit in time, my apologies. My current structure looks like this: thread -> ---name var(32) ---subject var(128) ---email var(128) ---message longtext(2000) ---last int(11) ---password varchar(128) ---id int(11) <- this is what I need to auto-increment reply -> ---name var(32) ---subject var(128) ---email var(128) ---message longtext(2000) ---password varchar(128) ---id int(11) <- this is what I need to auto-increment I need "id" to be unique over both tables (reply & thread) and consecutive (in thread you'll see 11, and in reply you'll see 12, assuming they were both posted consecutively after eachother) Link to comment https://forums.phpfreaks.com/topic/254647-sql-child-tables/#findComment-1305743 Share on other sites More sharing options...
kickstart Posted January 9, 2012 Share Posted January 9, 2012 Hi Don't beleive it can be done without playing around with a single counter table to source the values from. All the best Keith Link to comment https://forums.phpfreaks.com/topic/254647-sql-child-tables/#findComment-1305786 Share on other sites More sharing options...
fenway Posted January 9, 2012 Share Posted January 9, 2012 Why do you think you want this? Link to comment https://forums.phpfreaks.com/topic/254647-sql-child-tables/#findComment-1305798 Share on other sites More sharing options...
Username: Posted January 10, 2012 Author Share Posted January 10, 2012 Why do you think you want this? It will be for an imageboard type-thinger. I need to have post numbers, or maybe I don't, I don't know yet. Link to comment https://forums.phpfreaks.com/topic/254647-sql-child-tables/#findComment-1306012 Share on other sites More sharing options...
fenway Posted January 10, 2012 Share Posted January 10, 2012 You don't need post numbers. Link to comment https://forums.phpfreaks.com/topic/254647-sql-child-tables/#findComment-1306225 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.