Last updated date

Hello,
Here is the loop of the document on my article page. May it is useful to know, I have changed the platform of the hosting and now I’m using the new version of My SQL.

#FIN_SURLIGNE

[(#REM) Portfolio : album d’images ]
<B_documents_portfolio>

<:info_portfolio:>

[(#FICHIER|copie_locale|image_reduire{0,60}|inserer_attribut{alt,[(#TITRE|couper{80}|texte_backend)]})]
#EMBED_DOCUMENT [
(#TITRE)
] [
(#DESCRIPTIF)
]

[

<:info_ps:>

#DEBUT_SURLIGNE
(#PS)
#FIN_SURLIGNE
]

[(#REM) Autres documents joints a l’article ]
<B_documents_joints>

<:titre_documents_joints:>

The error on my webpages is the following:

  • **MySQL اشتباه**
    documents.id_document, 0+documents.titre AS num, J1.mime_type, documents.titre, J1.titre AS type_document, documents.taille, documents.descriptif FROM spip_documents_articles AS L1, spip_types_documents AS J1, spip_documents AS documents WHERE (L1.id_article = '1290') AND (documents.mode = 'document') AND ((documents.id_document NOT IN (0))) AND (documents. = J1.) AND (documents.taille > 0 OR documents.distant="oui") AND documents.id_document=L1.id_document GROUP BY documents.id_document ORDER BY num, documents.date
    **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 '= J1.) AND (documents.taille > 0 OR documents.distant="oui") AND documents.id_' at line 6**
    كمك,

Kamran Mir Hazar

Exiled Poet, Writer, Journalist and Web Master
Email: kamran_mirhazar@yahoo.com & Editor@kabulpress.org
Web: www.kabulpress.org & www.rahapen.org

----- Original Message ----
From: Gilles Vincent gilles.vincent@gmail.com
To: Thomas Sutton thomas@bouncingorange.com
Cc: spip-en@rezo.net; kamran Mir Hazar editor@kabulpress.org
Sent: Thursday, March 20, 2008 10:00:10 AM
Subject: Re: [Spip-en] Last updated date

On Thu, Mar 20, 2008 at 3:20 AM, Thomas Sutton
<thomas@bouncingorange.com> wrote:

<BOUCLE_tous>(documents)

Hi,

Do you mean
<BOUCLE_tous(DOCUMENTS)>
?

Can you give us the complete loop ?

.Gilles

MySQL اشتباه
documents.hauteur, documents.largeur, J0.inclus, documents.id_document,
J0.extension, documents.titre, documents.descriptif FROM
spip_types_documents AS J0, spip_documents AS documents WHERE
(documents.id_document = ‹ 1247 ›) AND (documents. = J0.) AND
(documents.taille > 0 OR documents.distant=« oui »)
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 ‹ = J0.) AND
(documents.taille > 0 OR documents.distant=« oui ») › at line 4
Regards

Regards,

Thomas Sutton
Web Developer
bouncingorange
graphic + web design

P: +61 (0)8 9227 0037
M: +61 (0)438 126 456
E: thomas@bouncingorange.com
W: www.bouncingorange.com
A: Suite 8 / 442 Beaufort Street, Highgate WA 6003


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Hello,
Here is the loop of the document on my article page. May it is useful to know, I have changed the platform of the hosting and now I'm using the new version of My SQL.

<snip>

I can't see anything obviously wrong with BOUCLE_documents_joints, sorry. Lets go through the WHERE clauses and see if we can determine where this broken bit comes from:

(L1.id_article = '1290') AND (documents.mode = 'document') AND

These come from {id_article} and {mode=document} and:

((documents.id_document NOT IN (0))) AND

is the bit where {doublons} excludes IDs that have already been seen.

(documents. = J1.) AND

This is the broken bit.

(documents.taille > 0 OR documents.distant="oui") AND documents.id_document=L1.id_document

These bits restrict the query to return only real documents (size > 0, or a link) and join between the article and document tables.

The same (slightly modified to remove the database name) query generated by one of my sites is:

SELECT documents.id_document, documents.fichier, documents.descriptif FROM spip_documents_rubriques AS `L1`, spip_documents AS `documents` WHERE (L1.id_rubrique = '33') AND (documents.mode = 'document') AND ((documents.id_document NOT IN (0,165))) AND (documents.taille > 0 OR documents.distant="oui") AND documents.id_document=L1.id_document GROUP BY documents.id_document

and the loop:

<BOUCLE_imgs(DOCUMENTS){id_rubrique}{mode=document}{doublons}>

As you can see, the problem clause isn't there. I'd look at either your SPIP installation (Is it modified? Did it get transferred correctly and completely?) or any plugins you've installed. Something is either adding this extra WHERE clause when it shouldn't, or something about {doublons} is broken on your system.

Have you installed any plugins or any other third party code?

Regards,

Thomas Sutton
Web Developer
bouncingorange
graphic + web design