PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > Query error
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Query error

Réponse
 
LinkBack Outils de la discussion
Vieux 22/08/2007, 04h38   #1
Naz Gassiep
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Query error

Hi,
I'm trying to execute this query:

SELECT group_post.group_thread_id,
FROM group_post
LEFT OUTER JOIN group_post_moderation ON (group_post.group_post_id = group_post_moderation.group_post_id)
LEFT OUTER JOIN group_post_mod_option ON (group_post_moderation.group_post_moderation_optio n = group_post_mod_option.option_id)
WHERE group_thread_id = '6'
GROUP BY group_post.group_thread_id
ORDER BY lft;

But when I do, I get this error:

ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right sy
ntax to use near 'FROM group_post
LEFT OUTER JOIN group_post_moderation ON (grou

Can anyone please tell me what is causing that? I'm using MySQL4.

Thanks,
- Naz.


  Réponse avec citation
Vieux 22/08/2007, 07h34   #2
Gerard van Beek
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Query error

The comma at the end of the SELECT statement needs to be removed

Naz Gassiep wrote:
> Hi,
> I'm trying to execute this query:
>
> SELECT group_post.group_thread_id,
> FROM group_post
> LEFT OUTER JOIN group_post_moderation ON (group_post.group_post_id
> = group_post_moderation.group_post_id)
> LEFT OUTER JOIN group_post_mod_option ON
> (group_post_moderation.group_post_moderation_optio n =
> group_post_mod_option.option_id)
> WHERE group_thread_id = '6'
> GROUP BY group_post.group_thread_id
> ORDER BY lft;
>
> But when I do, I get this error:
>
> ERROR 1064: You have an error in your SQL syntax. Check the manual
> that corresponds to your MySQL server version for the right sy
> ntax to use near 'FROM group_post
> LEFT OUTER JOIN group_post_moderation ON (grou
>
> Can anyone please tell me what is causing that? I'm using MySQL4.
>
> Thanks,
> - Naz.
>
>
>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 06h52.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07230 seconds with 10 queries