SELECT
36_serviceattributegroups.text_AttributeGroupDescription,
36_serviceattributegroups.bigint_OwnerKeyID,
3_serviceattributes.text_AttributeDescription,
GROUP_CONCAT(
36_serviceattributegroups.bigint_AttributeIncludedID
SEPARATOR ", "),
#GROUP_CONCAT(
# IF(
# 36_serviceattributegroups.bigint_AttributeIncludedID,
# (SELECT text_AttributeDescription FROM 3_serviceattributes WHERE bigint_AttributeID = 36_serviceattributegroups.bigint_AttributeIncludedID),
# NULL
# ) AS text_AttributeParentDescription
# SEPARATOR ", "),
3_serviceattributes.bigint_AttributeServiceID
FROM
3_serviceattributes,
36_serviceattributegroups
GROUP BY
36_serviceattributegroups.bigint_OwnerKeyID
WHERE
3_serviceattributes.bigint_AttributeServiceID = 1 AND
3_serviceattributes.bigint_AttributeID = 36_serviceattributegroups.bigint_OwnerKeyID;
this returns#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 'WHERE 3_serviceattributes.bigintwhat am i doing wrong? and the commented part needs to be included as well - that returns the following error in PMA:_Attribute ServiceID = 1 AND 3_serviceattribu' at line 20
#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 'AS text_AttributeParentDescrihelp please!!!! i cannot seem to get this function to work in this context :/ption SEPARATOR ", "), 3_serviceattributes.big' at line 13
SELECT
36_serviceattributegroups.text_AttributeGroupDescription,
36_serviceattributegroups.bigint_OwnerKeyID,
3_serviceattributes.text_AttributeDescription,
GROUP_CONCAT(
36_serviceattributegroups.bigint_AttributeIncludedID
SEPARATOR ', '),
GROUP_CONCAT(
IF(
(36_serviceattributegroups.bigint_AttributeIncludedID > 0),
(SELECT text_AttributeDescription FROM 3_serviceattributes WHERE bigint_AttributeID = 36_serviceattributegroups.bigint_AttributeIncludedID),
NULL
) AS text_AttributeParentDescription
SEPARATOR ', '),
3_serviceattributes.bigint_AttributeServiceID
FROM
3_serviceattributes,
36_serviceattributegroups
WHERE
3_serviceattributes.bigint_AttributeServiceID = 1 AND
3_serviceattributes.bigint_AttributeID = 36_serviceattributegroups.bigint_OwnerKeyID
GROUP BY
36_serviceattributegroups.bigint_OwnerKeyID;
still gives the folllowing 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 'AS text_AttributeParentDescri:/ption SEPARATOR ', '), 3_serviceattributes.big' at line 13
SELECT
36_serviceattributegroups.text_AttributeGroupDescription,
36_serviceattributegroups.bigint_OwnerKeyID,
3_serviceattributes.text_AttributeDescription,
GROUP_CONCAT(
36_serviceattributegroups.bigint_AttributeIncludedID
SEPARATOR ', ') AS bigint_AttributeIncludedID,
GROUP_CONCAT(
IF(
(36_serviceattributegroups.bigint_AttributeIncludedID > 0),
(SELECT text_AttributeDescription FROM 3_serviceattributes WHERE bigint_AttributeID = 36_serviceattributegroups.bigint_AttributeIncludedID),
""
)
SEPARATOR ', ') AS text_AttributeParentDescription,
3_serviceattributes.bigint_AttributeServiceID
FROM
3_serviceattributes,
36_serviceattributegroups
WHERE
3_serviceattributes.bigint_AttributeServiceID = 1 AND
3_serviceattributes.bigint_AttributeID = 36_serviceattributegroups.bigint_OwnerKeyID
GROUP BY
36_serviceattributegroups.bigint_OwnerKeyID;
i guess a long day's development does take it out of you! lol :)Title | # Comments | Views | Activity |
---|---|---|---|
Wordpress syntax error | 1 | 28 | |
Page showing diff display | 4 | 21 | |
Multiple methods, one main controller in Codeigniter | 6 | 23 | |
php variable basic question | 12 | 27 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
23 Experts available now in Live!