Code:
-- Start thread transfer
BEGIN
DECLARE mybb_tid INT;
DECLARE first_pid INT;
DECLARE last_pid INT;
DECLARE user_id INT;
-- Insert Mybb_threads record
INSERT INTO Mybb_threads (fid, subject, username, lastposter, closed, notes, visible) VALUES (6, 'Lucky Star Trading Figures FS', 'dummy', 'dummy', '', '', 1, 0);
-- Get thread ID
SET mybb_tid = mysql_insert_id(, 0);
-- Beginning post insertion for thread
-- Get user id for author of first post
SET user_id = SELECT uid from Mybb_users WHERE username = 'robkelk';
-- Update Mybb_threads record with info from first post
UPDATE Mybb_threads SET uid = user_id, username = 'robkelk', dateline = 1199771400 WHERE tid = mybb_tid;
-- Start posts loop
-- Get user id for author of current post
SET user_id = SELECT uid from Mybb_users WHERE username = 'robkelk';
-- Create Mybb_posts record for post number 0
INSERT INTO Mybb_posts (tid, fid, subject, uid, username, dateline, message, visible) VALUES (mybb_tid, 6, 'Lucky Star Trading Figures FS', user_id, 'robkelk', 1199771400, 'I seem to recall some folks around here like <em>Lucky Star</em>. I bought a box of <a class="postlink" href="http://www.cdjapan.co.jp/detailview.html?KEY=NEOSL-12291&ref=myp">Series 1 trading figures</a>, and it arrived today. (And that's the only good thing about being home sick today...)<br>
There aren't any rare or repaint figures - each can be assembled in either of two poses. I got two each of Konata, Kagami, Tsukasa, and Miyuki, and one each of Kuroi-sensei and the "mystery figure" (who I couldn't say in my CDJapan review is Akira from <em>Lucky Channel).</em><br>
So... I'd like to get my money back on the duplicate Konata, Kagami, and Tsukasa. I might be persuaded to part with the duplicate Miyuki. Ten figures, plus shipping, plus Customs, comes out to approximately $65.00. Divide that by ten gives $6.50 each, then add <a class="postlink" href="http://www.canadapost.ca/personal/tools/calcrate-e.asp">your shipping cost</a> from postal code K1V 0V4...<br>
Any interest?<br>
-Rob Kelk<br>
"Actually, my goal is to write neat stories. The money just makes it possible for me to write them faster and then buy neat toys."<br>
Ryk E. Spoor, 7 November 2007<br><em>--<br>
Rob Kelk<br>
"Governments have no right to question the loyalty of those who oppose <br>
them. Adversaries remain citizens of the same state, common subjects of <br>
the same sovereign, servants of the same law."<br>
<br>
- Michael Ignatieff, addressing Stanford University in 2012 </em>', 1, 0);
-- Save first post's ID.
SET first_tid = mysql_insert_id(, 0);
-- Get user id for author of current post
SET user_id = SELECT uid from Mybb_users WHERE username = 'Morganite';
-- Create Mybb_posts record for post number 1
INSERT INTO Mybb_posts (tid, fid, subject, uid, username, dateline, message, visible) VALUES (mybb_tid, 6, 'Re: Lucky Star Trading Figures FS', user_id, 'Morganite', 1199802180, 'Well, I'm *interested*. I'm just not sure I'll have any money before the end of this month. >.>;;;<br>
-Morgan, would be interested in all four though. If I have money. >.>"Mikuru-chan molested me! I'm... so happy!"<br>
-Haruhi, "The Ecchi of Haruhi Suzumiya"<br>
---(Not really)', 1, 0);
-- Get user id for author of current post
SET user_id = SELECT uid from Mybb_users WHERE username = 'robkelk';
-- Create Mybb_posts record for post number 2
INSERT INTO Mybb_posts (tid, fid, subject, uid, username, dateline, message, visible) VALUES (mybb_tid, 6, 'Re: Lucky Star Trading Figures FS', user_id, 'robkelk', 1202543940, 'It's been a month... still interested?<br><em>--<br>
Rob Kelk<br>
"Governments have no right to question the loyalty of those who oppose <br>
them. Adversaries remain citizens of the same state, common subjects of <br>
the same sovereign, servants of the same law."<br>
<br>
- Michael Ignatieff, addressing Stanford University in 2012 </em>', 1, 0);
-- Get user id for author of current post
SET user_id = SELECT uid from Mybb_users WHERE username = 'Morganite';
-- Create Mybb_posts record for post number 3
INSERT INTO Mybb_posts (tid, fid, subject, uid, username, dateline, message, visible) VALUES (mybb_tid, 6, '', user_id, 'Morganite', 1202593920, 'Still interested. I won't have money until the end of next week though.<br>
<br>
<br>
<br>
<br>
-Morgan.', 1, 0);
-- Get user id for author of current post
SET user_id = SELECT uid from Mybb_users WHERE username = 'robkelk';
-- Create Mybb_posts record for post number 4
INSERT INTO Mybb_posts (tid, fid, subject, uid, username, dateline, message, visible) VALUES (mybb_tid, 6, '', user_id, 'robkelk', 1202596740, 'Okay. When you're ready, e-mail me - my board handle at gmail.com works.<br><em>--<br>
Rob Kelk<br>
"Governments have no right to question the loyalty of those who oppose <br>
them. Adversaries remain citizens of the same state, common subjects of <br>
the same sovereign, servants of the same law."<br>
<br>
- Michael Ignatieff, addressing Stanford University in 2012 </em>', 1, 0);
-- Get user id for author of current post
SET user_id = SELECT uid from Mybb_users WHERE username = 'robkelk';
-- Create Mybb_posts record for post number 5
INSERT INTO Mybb_posts (tid, fid, subject, uid, username, dateline, message, visible) VALUES (mybb_tid, 6, '', user_id, 'robkelk', 1204666200, 'Morganni, it's been almost a month since you said "the end of next week". To be fair to everyone else, I can't hold them for much longer...<br>
I'll wait for one more week, but that's it.<br><em>--<br>
Rob Kelk<br>
"Governments have no right to question the loyalty of those who oppose <br>
them. Adversaries remain citizens of the same state, common subjects of <br>
the same sovereign, servants of the same law."<br>
<br>
- Michael Ignatieff, addressing Stanford University in 2012 </em>', 1, 0);
-- Get user id for author of current post
SET user_id = SELECT uid from Mybb_users WHERE username = 'Morganite';
-- Create Mybb_posts record for post number 6
INSERT INTO Mybb_posts (tid, fid, subject, uid, username, dateline, message, visible) VALUES (mybb_tid, 6, '', user_id, 'Morganite', 1204716900, 'Yeah, sorry about that. I meant to get back to you on that, and then I went and did something extremely stupid. -.-;;;<br>
<br>
<br>
<br>
<br>
However, barring something quite surprising (like a sudden need for car repairs that aren't covered by the service plan I have, which I don't expect,<br>
since the service plan covers just about anything I can think of), I'll have money I can spend on figures when I get my next paycheck. Which is the end of<br>
this week.<br>
<br>
<br>
<br>
<br>
Edit: I do ineed have money now; I'll email you tomorrow?<br>
<br>
<br>
<br>
<br>
-Morgan, really really sorry. #-.-#', 1, 0);
-- Get user id for author of current post
SET user_id = SELECT uid from Mybb_users WHERE username = 'robkelk';
-- Create Mybb_posts record for post number 7
INSERT INTO Mybb_posts (tid, fid, subject, uid, username, dateline, message, visible) VALUES (mybb_tid, 6, '', user_id, 'robkelk', 1205303340, 'Sounds good. Again, my board handle at gmail.com gets mail to me.<br>
<br>
<br>
<br>
<br>
I just realized I didn't provide the necessary shipping information... Weight is approximately 0.2kg, dimensions (after I find a suitable box) will be a<br>
minimum of 12cm x 12 cm x 7 cm (and I'll do my level best to get a box as close to that size as possible).<br><em>--<br>
Rob Kelk<br>
"Governments have no right to question the loyalty of those who oppose <br>
them. Adversaries remain citizens of the same state, common subjects of <br>
the same sovereign, servants of the same law."<br>
<br>
- Michael Ignatieff, addressing Stanford University in 2012 </em>', 1, 0);
-- Get user id for author of current post
SET user_id = SELECT uid from Mybb_users WHERE username = 'robkelk';
-- Create Mybb_posts record for post number 8
INSERT INTO Mybb_posts (tid, fid, subject, uid, username, dateline, message, visible) VALUES (mybb_tid, 6, '', user_id, 'robkelk', 1206685680, 'It should be obvious, but...<br>
<br>
<br>
<br>
<br>
They're all gone (to Morganni). Thank you for your interest.<br><em>--<br>
Rob Kelk<br>
"Governments have no right to question the loyalty of those who oppose <br>
them. Adversaries remain citizens of the same state, common subjects of <br>
the same sovereign, servants of the same law."<br>
<br>
- Michael Ignatieff, addressing Stanford University in 2012 </em>', 1, 0);
-- End posts loop
-- Get id of final post
SET last_pid = mysql_insert_id(, 0);
-- Get user id for author of final post
SET user_id = SELECT uid from Mybb_users WHERE username = 'robkelk';
-- Update Mybb_threads record for the last time
UPDATE Mybb_threads SET firstpost = first_pid, lastpost = last_pid, lastposter = 'robkelk', lastposteruid = user_id, replies = 8 WHERE tid = mybb_tid;
-- And we're done.
END
---------
Then the horns kicked in...
...and my shoes began to squeak.