Advertisement:

WBB 2.3.* to SMF 1.1 RC3

Aloittaja Ic3Demon, syyskuu 23, 2006, 08:45:38 IP

« edellinen - seuraava »

Ic3Demon

Caused the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(description, 1, 65534), numTopics, numPosts, memberGroups)
    VAL' at line 2



What todo now? ..

reepo2k

#1
I got the same problem:
LainaaConverting boards... Unsuccessful!
LainaaCaused the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(description, 1, 65534), numTopics, numPosts, memberGroups)
VALU' at line 2

It would be great if someone can help me.

greetings: reepo2k

Edit:
Woltlab Burning board version: 2.3.6
SMF Version: 1.1.1

Edit2:
Problem solved: http://www.simplemachines.org/community/index.php?topic=118655.0
Next problem:
LainaaConverting personal messages (step 1)... Unsuccessful!
This query:

    SELECT
    pm.privatemessageid AS ID_PM, pm.senderid AS ID_MEMBER_FROM,
    IF(pm.deletepm = 2, 1, 0) AS deletedBySender, pm.sendtime AS msgtime,
    SUBSTRING(IFNULL(u.username, 'Guest'), 1, 255) AS fromName,
    SUBSTRING(pm.subject, 1, 255) AS subject,
    SUBSTRING(pm.message, 1, 65534) AS body
    FROM `K10159-01sql1`.bb1_privatemessage AS pm
    LEFT JOIN `K10159-01sql1`.bb1_users AS u ON (u.userid = pm.senderid)
    LIMIT 0, 500;

Caused the error:

    Unknown column 'pm.deletepm' in 'field list'

Mazumoto


mkress

Lainaus käyttäjältä: Mazumoto - tammikuu 06, 2007, 02:37:01 IP
same here (Edit2 Problem) ...

i have the same problem:
    SELECT
    pm.privatemessageid AS ID_PM, pm.senderid AS ID_MEMBER_FROM,
    IF(pm.deletepm = 2, 1, 0) AS deletedBySender, pm.sendtime AS msgtime,
    SUBSTRING(IFNULL(u.username, 'Guest'), 1, 255) AS fromName,
    SUBSTRING(pm.subject, 1, 255) AS subject,
    SUBSTRING(pm.message, 1, 65534) AS body
    FROM `govista`.bb1_privatemessage AS pm
    LEFT JOIN `govista`.bb1_users AS u ON (u.userid = pm.senderid)
    LIMIT 0, 500;

Caused the error:

    Unknown column 'pm.deletepm' in 'field list'

Mazumoto

Warning: This code is untested. Use at your own risk !

To get this working:
Open up the file burningboard2_to_smf.sql from the converter-package in an editor of some kind (I used eclipse)
Change Line 303 (that's a few lines under Converting personal messages (Step 1)) from
IF(pm.deletepm = 2, 1, 0) AS deletedBySender, pm.sendtime AS msgtime,
to
0 AS deletedBySender, pm.sendtime AS msgtime,

A few lines below you'll find "Converting personal messages (Step 2)". There you have to do the following:
Replace
---* {$to_prefix}pm_recipients
SELECT
pm.privatemessageid AS ID_PM, pm.recipientid AS ID_MEMBER, 1 AS is_read,
IF(pm.deletepm = 1, 1, 0) AS deleted, '-1' AS labels
FROM {$from_prefix}privatemessage AS pm;
---*

with
---# Splitting Recipients-String from recipientlist
---{
while(true)
{
pastTime($substep);

$result = convert_query ("
SELECT privatemessageid, recipientlist
FROM {$from_prefix}privatemessage
LIMIT " . (int) $_REQUEST['start'] . ", 25");
while ($row = mysql_fetch_row($result))
{
$id_pm = $row[0];
preg_match_all("/i:([0123456789]*);/", $row[1], $matches);
foreach ($matches[1] as $id_member)
{
convert_query("
INSERT INTO {$to_prefix}pm_recipients
(ID_PM, ID_MEMBER, labels, bcc, is_read, deleted)
VALUES
($id_pm, $id_member, -1, 0, 1, 0)");
}
}

$_REQUEST['start'] += 25;
if (mysql_num_rows($result) < 25)
break;

mysql_free_result($result);
}
$_REQUEST['start'] = 0;
---}
---#


That should convert pm's as well. I don't really have an idea about Databases/SQL/php, so this code might be quite ugly, but for me it worked. As I said: use at your own risk. And keep in mind that I just ignore the "deletedBySender"-Field. I don#t think it's very bad, but as I said - I'm not sure about it. There is probably an easier way to do this via a different table I just discovered.

I hope this helps a few people.
Mazumoto.

Mazumoto

I made an improved version which is way simpler and handles bcc-ed pm's as well. It also should set all flags correctly (deletedBySender and deleted), though I'm not sure wbb's inoutbox really has the negated meaning of smf's deletedBySender. My Test looked good though.

Again, use this at your own risk !

The improved line 303 for Step 1 would be:
IF(pm.inoutbox = 1, 0, 1) AS deletedBySender, pm.sendtime AS msgtime,

And the code for Step 2 would be (just replace the sql-statement starting with "SELECT"):
SELECT
pmr.privatemessageid AS ID_PM, pmr.recipientid AS ID_MEMBER,
IF(pmr.view > 0, 1, 0) AS is_read, IF(pmr.deletepm = 1, 1, 0) AS deleted,
'-1' AS labels, pmr.blindcopy AS bcc
FROM {$from_prefix}privatemessagereceipts AS pmr;



Greetings,
Mazumoto.

mithrendil

Hello, i have a problem too with this converter:

"Converting ranks... Successful.
Converting members... Successful.
Converting avatars... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting polls...
Fatal error: set_time_limit() [<a href='function.set-time-limit'>function.set-time-limit</a>]: Cannot set time limit in safe mode in /mnt/125/sda/0/4/mohdeveloppement/swmod/forum/convert.php on line 1562"

what is it?

SleePy

Is this issue solved or do you still require assistance?

It appears your forum is in safe mode. The converter script is trying to extend the scripts timelimit but is unable to.
You should ask your host about this, Safe mode isn't very good practice to use and has been removed in php6.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: