Through Heidisql, I'm trying to copy certain columns of data, in one table, and insert them into another table.
Both tables are in the same database, abc_spare1.
So, I created the following code for the task.
It seems to run without error, but I have not, yet, seen any new data in the second table.
So, I was wondering if the code was missing something that Heidisql needed.
Is that the case?
Following is that code:
CREATE PROCEDURE Getdata1()
DECLARE COUNTER1 INT DEFAULT 0;
DECLARE bbcode_uid VARCHAR(10);
DECLARE post_subject VARCHAR(60);
DECLARE post_text TEXT;
DECLARE CUR CURSOR FOR SELECT * FROM phpbb2_posts_text1;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET COUNTER1=1;
DECLARE CONTINUE HANDLER FOR SQLSTATE '23000' SET COUNTER1=1;
IF COUNTER1=1 THEN
IF NOT COUNTER1=1 THEN
FETCH CUR INTO bbcode_uid,post_subject,post_text;
INSERT INTO phpbb3_posts3 VALUES(bbcode_uid,post_subject,post_text);
Ads were blocked by your webbrowser.
This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.
You may want to send a donation instead.