DB Error 1064

14 years 5 months ago #115954 by corbin1
Replied by corbin1 on topic Re:DB Error 1064
here is the message i get with the debug mode :

500 - Une erreur est survenue

JDatabaseMySQL::query: 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 '(g.id SEPARATOR ' ') AS groupids FROM jos_users AS b LEFT JOIN SQL=SELECT b.*, GROUP_CONCAT(g.id SEPARATOR ' ') AS groupids FROM jos_users AS b LEFT JOIN jos_gj_users AS u ON u.id_user = b.id LEFT JOIN jos_gj_groups AS g ON u.id_group = g.id WHERE b.id IN (62,63,64) GROUP BY b.id

Call stack
# Function Location
1 JAdministrator->dispatch() ../www/administrator/index.php:67
2 JComponentHelper->renderComponent() ../www/administrator/includes/application.php:136
3 require_once() ../www/libraries/joomla/application/component/helper.php:162
4 membersManager() ../www/administrator/components/com_groupjive/admin.groupjive.php:126
5 CBdatabase->loadObjectList() ../www/administrator/components/com_groupjive/admin.groupjive.php:821
6 CBdatabase->query() ../www/administrator/components/com_comprofiler/library/cb/cb.database.php:838
7 JDatabaseMySQL->query() ../www/administrator/components/com_comprofiler/library/cb/cb.database.php:673
8 JError->raiseError() ../www/libraries/joomla/database/database/mysql.php:231
9 JError->raise() ../www/libraries/joomla/error/error.php:171
10 JException->__construct() ../www/libraries/joomla/error/error.php:136

Please Log in to join the conversation.

14 years 5 months ago #115967 by corbin1
Replied by corbin1 on topic Re:DB Error 1064
it seems that the problem would be it's better to indicate directly columns we need, instead of using SELECT b.*

$query = "SELECT b.*,
...
GROUP BY B.Id ;

if somebody knows the correct programmation, ...

Please Log in to join the conversation.

14 years 5 months ago #115971 by krileon


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

14 years 5 months ago #115977 by corbin1
Replied by corbin1 on topic Re:DB Error 1064
i'm afraid i'm going to look impertinent, but i tried

In: admin.groupjive.php
On: 815
From:
."\nWHERE b.id IN ($tmp)"
To:
."\nWHERE b.id IN (".($tmp?$tmp:0).")"

so what ?
i've always

DB function failed with error number 1064
You have an error in your SQL syntax.etc...

Please Log in to join the conversation.

14 years 5 months ago #116111 by corbin1
Replied by corbin1 on topic Re:DB Error 1064
i have had the information it would be better to replace

SELECT B.*
...
GROUP BY B.Id

by the columns needed themselves;
what would it be then ?

Please Log in to join the conversation.

14 years 5 months ago #116175 by corbin1
Replied by corbin1 on topic Re:DB Error 1064
as i was fed up (i hope it's not too rude !) with this, i tried many stupid things;
the last one was

$query = "SELECT b.* AS groupids"
."\nFROM #__users AS b "
."\nLEFT JOIN #__gj_users AS u ON u.id_user = b.id"
."\nLEFT JOIN #__gj_groups AS g ON u.id_group = g.id"
."\nWHERE b.id IN (".($tmp?$tmp:0).")"
. $and
."\nGROUP BY b.id" ;

(no more GROUP_CONCAT)
AND I GET MY MEMBERS LIST, YEEEEES !

Post edited by: corbin1, at: 2009/11/06 13:39

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.211 seconds