Previous Thread
Next Thread
Print Thread
Hop To
Joined: Mar 2008
Posts: 327
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 327
admin/database.php?returntab=1 (SQL Command in CP)

  1. Type a query that contains line breaks into the Query box.
  2. Save the query.
  3. Click the 'Execute' link next to the saved query.
  4. Enjoy a SQL error.


Fix:
In templates/default/admin/database.tmpl find:
Code
function exeCommand (i) {
	document.sql.command.value = commandArray[i];
	document.sql.submit();
}
and replace it with:
Code
function exeCommand (i) {
	document.sql.command.value = commandArray[i].replace(/JSLBR/g,'\n');
	document.sql.submit();
}

Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
Joined: Jun 2006
Posts: 1,344
Yes, I saw this bout a week ago when doing the same. I needed to click use and than execute for it to wor.k right

Joined: Mar 2008
Posts: 327
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 327
It appears that this existed in 7.4.2 (since the code snippet culprit is identical) but I guess nobody noticed it. I don't know how far back in versions it goes, but at least they have a fix now. smile

Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
Joined: Jun 2006
Posts: 1,344
I noticed it in 7.4.2 and while in Pm with Rick mentioned it, not sure if he saw it though.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Thanks for the report and fix.

Joined: Mar 2008
Posts: 327
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 327
[Linked Image from ubbdev.com]

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
-1 brownie points for posting dancing fruit frown

Joined: Mar 2008
Posts: 327
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 327
But that's how you know it's ripe! wink

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
That's how you know it's been possessed by the devil!

Joined: Mar 2008
Posts: 327
D
Enthusiast
Enthusiast
D Offline
Joined: Mar 2008
Posts: 327
Mmm... sacrilicious.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
1 members (1 invisible), 304 guests, and 96 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)