Welcome, Guest. Please Login or Register.
July 09, 2025, 05:01:09 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  English Help  |  Error splitting a thread « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Error splitting a thread  (Read 552 times)
jhames
Noobie
*
Posts: 8


I'm a llama!

Error splitting a thread
« on: March 01, 2003, 05:42:58 AM »
Reply with quote

I just tried splitting a thread for the first time and got this error:

QuoteYou have an error in your SQL syntax near 'Inservices' WHERE ID_MSG=75 AND ID_TOPIC=31' at line 1
File: D:\InetPub\wwwroot\Forum\Sources\SplitThreads.php
Line: 187

I am going to look into it a little deeper, but I thought that someone here might have some information.

Thanks!

Joel
Logged
jhames
Noobie
*
Posts: 8


I'm a llama!

Re:Error splitting a thread
« Reply #1 on: March 01, 2003, 05:44:06 AM »
Reply with quote

I just realized that the thread was split, despite getting this error.  I am still a little concerned, though...

-Joel
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:Error splitting a thread
« Reply #2 on: March 01, 2003, 05:50:00 AM »
Reply with quote

Just a guess but maybe the subject had a ' in it?
Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Error splitting a thread
« Reply #3 on: March 01, 2003, 05:50:25 AM »
Reply with quote

This is indeed a bug.... the subject is not being escaped.

-[Unknown]
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Error splitting a thread
« Reply #4 on: March 02, 2003, 01:37:26 AM »
Reply with quote

Sources/SplitThreads.php

Find:
$result = mysql_query("UPDATE {$db_prefix}messages SET subject='$subname' WHERE ID_MSG=$at AND ID_TOPIC=$split2_topicID") or database_error(__FILE__, __LINE__);

Replace:
$result = mysql_query("UPDATE {$db_prefix}messages SET subject='" . addslashes($subname) . "' WHERE ID_MSG=$at AND ID_TOPIC=$split2_topicID") or database_error(__FILE__, __LINE__);

Find:
$result = mysql_query("UPDATE {$db_prefix}messages SET ID_TOPIC=$split2_topicID,subject='$subname' WHERE ID_TOPIC=$split1_topicID AND ID_MSG IN ($postList)") or database_error(__FILE__, __LINE__);

Replace:
$result = mysql_query("UPDATE {$db_prefix}messages SET ID_TOPIC=$split2_topicID,subject='" . addslashes($subname) . "' WHERE ID_TOPIC=$split1_topicID AND ID_MSG IN ($postList)") or database_error(__FILE__, __LINE__);

-[Unknown]
Logged
jhames
Noobie
*
Posts: 8


I'm a llama!

Re:Error splitting a thread
« Reply #5 on: March 02, 2003, 04:53:43 PM »
Reply with quote

It worked perfectly..

Thanks again!

Joel
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Error splitting a thread « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.081 seconds with 21 queries.