Selecting whatever source type from the combo menu, the following error is displayed together with required fields:

user warning: You have an error in your SQL syntax near 'ON b.fid = c.fid where tid= 101 ORDER BY b.weight ASC' at line 1 query: SELECT b.*, c.name, c.type FROM biblio_type_details as b JOIN biblio_fields as c ON b.fid = c.fid where tid= 101 ORDER BY b.weight ASC in /home/virtual/site106/fst/var/www/html/includes/database.mysql.inc on line 167.

CommentFileSizeAuthor
#3 patch_94.txt765 byteskmv

Comments

rjerome’s picture

Regrettably, I can't reproduce this error. What version of MySQL are you running?

mfh’s picture

I also got this error.
I (i.e. the guys running the server I have to work on...) am/are running MySQL 3.23,
which seems not to support the "JOIN...ON" syntax.

As a temporary fix,I replaced "ON xxx where yyy" by "WHERE xxx and yyy"
in the (only) 2 occurences of " JOIN " in biblio.module.

This seems to work, but I'm not a SQL guru and therefore
- maybe there is a (much) better solution
- maybe what I did will not work (well) in some cases.

It would be nice to have
- a confirmation by a competent person
- an automatic patch doing this (and issuing a warning if this could cause problems) on installation/activation, if Mysql 3.23 is detected.

Thanks in advance for an answer before closing the issue....

kmv’s picture

Title: SQL syntax » SQL error
Status: Active » Needs review
StatusFileSize
new765 bytes

I also have this error. It is a MySQL 3.23 problem - you must specify the INNER on the JOIN (it doesn't know if it should be doing an INNER or a LEFT join). Later versions are more tolerant and assume INNER.

I have attached a patch, which works for me.

rjerome’s picture

Thanks, for that, I integrated it into the code.

catdevrandom’s picture

Status: Needs review » Closed (fixed)