You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 377 guest(s) and 18 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Fighting againt Windmills - Bug in block-User_Info.php
Bug FixesLaffer writes "From Version 6.5 I am reporting from a wrong coding in block-User_Info.php which results in Slow queries, because of '%' Signs the Query can not use the Index.

Here again the FIX:

Locate this Area:

//Creating SQL parameter
$curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
$preday = strftime ("%d",$test);
$premonth = strftime ("%B",$test);
$preyear = strftime ("%Y",$test);
$curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";

and change to:

//StartModification ----------
//Modification to USE the INDEX 30-OCT-2003
//byOliverRatzeburg-webmaster@comicfan.de
//Creating SQL parameter
if (strlen($mday) == 1) { $mday = "0".$mday; };
$curDate2 = $month[0].$month[1].$month[2]." ".$mday.", ".$year;
$preday = strftime ("%d",$test);
$premonth = strftime ("%B",$test);
$preyear = strftime ("%Y",$test);
if (strlen($preday) == 1) { $preday = "0".$preday; };
$curDateP = $premonth[0].$premonth[1].$premonth[2]." ".$preday.", ".$preyear;
//EndofModification


Result: NO MORE SLOW QUERIES...."
Posted on Saturday, November 01 @ 16:26:37 CET by Zhen-Xjell
 
Related Links
· More about Bug Fixes
· News by Zhen-Xjell


Most read story about Bug Fixes:
Downloads & Web Links vulnerability Patch

Article Rating
Average Score: 0
Votes: 0

Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad


Options

 Printer Friendly Page  Printer Friendly Page

 Send to a Friend  Send to a Friend

Threshold
The comments are owned by the poster. We aren't responsible for their content.

No Comments Allowed for Anonymous, please register

Re: Fighting againt Windmills - Bug in block-User_Info.php (Score: 1)
by Jeruvy on Sunday, November 02 @ 10:02:11 CET
(User Info | Send a Message)
Nice, very clean solution and minimal code impact.


Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.032 Seconds - 440 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::