MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 11th, 2006, 03:20 PM
gixxer gixxer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 3 gixxer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 26 sec
Reputation Power: 0
Help for a complete noob

hi folks i have a problem with a site i have taken over when i look at a particular group i get the following error

Quote:
Error getting user list for group

DEBUG MODE

SQL Error : 1064 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 'ORDER BY u.username' at line 7

SELECT u.username, u.user_id, u.user_color_gc, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, ug.user_pending FROM phpbb_users u, phpbb_user_group ug WHERE ug.group_id = 2423 AND u.user_id = ug.user_id AND ug.user_pending = 0 AND ug.user_id <> ORDER BY u.username

Line : 806
File : groupcp.php




any help would be greatly appreciated i have had a look about and some answers seem to be kinda the same but out of my experiance level...which is next to nothing

Reply With Quote
  #2  
Old May 11th, 2006, 03:57 PM
Icon's Avatar
Icon Icon is offline
Command Line Warrior
Click here for more information
 
Join Date: Sep 2005
Posts: 622 Icon User rank is Private First Class (20 - 50 Reputation Level)Icon User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 22 h 40 m 30 sec
Reputation Power: 3
The last part: AND ug.user_id <> ORDER BY u.username
it says "ug.user <>", but it's missing the right operand, something like
"ug.user <> 4" or "ug.user <> 'john'" or something.. good luck

Reply With Quote
  #3  
Old May 11th, 2006, 05:31 PM
gixxer gixxer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 3 gixxer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 26 sec
Reputation Power: 0
do you mean in the File : groupcp.php ?

the quote is the error message displayed on the board......would it be better if i cut and pasted the text from the php file itself?

Reply With Quote
  #4  
Old May 12th, 2006, 01:31 AM
Icon's Avatar
Icon Icon is offline
Command Line Warrior
Click here for more information
 
Join Date: Sep 2005
Posts: 622 Icon User rank is Private First Class (20 - 50 Reputation Level)Icon User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 22 h 40 m 30 sec
Reputation Power: 3
Yes the error is probably in that file. The problem is that your php file is generating an incorrect sql statement. I showed you where the error probably is, you could figure out what's going wrong or paste the relevant part of the source if you want

Reply With Quote
  #5  
Old May 13th, 2006, 03:44 PM
gixxer gixxer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 3 gixxer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 26 sec
Reputation Power: 0
i have just went in and messed around in the sql code and have found where the mistake was......believe it or not i was looking at the wrong line

adding a number happened to be 1 made it all work just fine......thanks bud owe ya one

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Help for a complete noob


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway