Block Error

3.3 Forum ONLY: If you've run into a problem, such as an error message, blank page, or similar problem, this is where to look. Post any installation or other problems or questions here, and I and other users will try to help.
  
10 Sep '10 Fri Sep 10, 2010 05:18    
rudy386
Poster  Poster
  •  

Post Block Error

changed the new block display from most recent to most popular got this error message:

includes/db/db.php
CMS Warning line 75: On /index.php While executing query "SELECT a.id, a.catid, a.title, s.id ssid, c.id cid, c.sid FROM cms_pronews_articles as a LEFT JOIN cms_pronews_cats as c ON a.catid=c.id LEFT JOIN cms_pronews_sections as s ON c.sid=s.id WHERE a.approved="1" AND a.active="1" AND a.catid!="0" AND s.id="2" ORDER BY counter DESC, LIMIT 5" the following error occured: 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 'LIMIT 5' at line 1 In: /home/a4136642/public_html/modules/Pro_News/functions.php on line: 94


i'll just bet i should have deactivated the module b4 making the changes.
Sad
any advice?



rudy386's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Unix/2.2.13 /5.0.81/5.2/9.2.1

 
 
 
 
  
10 Sep '10 Fri Sep 10, 2010 06:09    
layingback
Site Admin  
  •  

Post Re: Block Error

No, just a typo in the code.

In modules/Pro_News/functions.php around line 83 look for:

PHP:
				} elseif ($bsets['type'] == 'popular') {
$sql .= ' ORDER BY counter DESC, '.$pnsettings['art_ordr'];
} else {
$sql .= ' ORDER BY score / ratings DESC, '.$pnsettings['art_ordr'];


and replace with:

PHP:
				} elseif ($bsets['type'] == 'popular') {
$sql .= ' ORDER BY counter DESC '.$pnsettings['art_ordr'];
} else {
$sql .= ' ORDER BY score / ratings DESC '.$pnsettings['art_ordr'];



Ie. delete the comma after counter DESC - and after ratings DESC while we're at it.

Let me know if it works, and I'll include in next release - RC release next week, maybe.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
10 Sep '10 Fri Sep 10, 2010 16:42    
rudy386
Poster  Poster
  •  

Post Re: Block Error

did the trick thank you...looking forward to the next release.



rudy386's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Unix/2.2.13 /5.0.81/5.2/9.2.1

 
 
 
 
  
10 Sep '10 Fri Sep 10, 2010 16:59    
rudy386
Poster  Poster
  •  

Post Re: Block Error

wait spoke too soon now. im getting the following error code:

includes/db/db.php
CMS Warning line 75: On /index.php?name=Pro_News&mode=submit While executing query "SELECT a.id, a.catid, a.title, s.id ssid, c.id cid, c.sid FROM cms_pronews_articles as a LEFT JOIN cms_pronews_cats as c ON a.catid=c.id LEFT JOIN cms_pronews_sections as s ON c.sid=s.id WHERE a.approved="1" AND a.active="1" AND a.catid!="0" AND s.id="2" ORDER BY counter DESC 1 LIMIT 5" the following error occured: 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 '1 LIMIT 5' at line 1 In: /home/a4136642/public_html/modules/Pro_News/functions.php on line: 91

includes/classes/blocks.php
Warning line 83: Invalid argument supplied for foreach()
Warning line 83: Invalid argument supplied for foreach()



rudy386's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Unix/2.2.13 /5.0.81/5.2/9.2.1

 
 
 
 
Link  QR 
Share this Printer Friendly Page  facebook   google+   linkedin   twitthis  
Show more ...


Forum Permissions - You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum