I just installed the dev version, including the weblinks blocks support. After adding a new weblink block to a sidebar region I got the following warning:
user warning: 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 'AND n.uid=1 ORDER BY n.sticky, n.created LIMIT 0, 10' at line 1 query: SELECT n.nid, n.sticky, n.created FROM node n INNER JOIN weblinks bw ON n.vid = bw.vid WHERE n.status = 1 AND AND n.uid=1 ORDER BY n.sticky, n.created LIMIT 0, 10 in
\sites\all\modules\weblinks\weblinks.module on line 1149.
relevant info in case the warning is related to my setup:
OS:Windows Vista, 32bit, using wampserver
I have php 5.2.9-1, apache 2.2.11
and mySQL 5.1.32
phpmydamin does report a discrepancy between mySQL and the php mysql lib: PHP MySQL library version 5.0.51a which may be relevant, but that seems to be an issue with availability of an up to date php library. Perhaps it could be the cause, although most searching for it as a problem yields advice that it should not cause problems.
Comments
Comment #1
GWD commentedI didn't see the wood for the trees to start with. There are two ANDs in the query.
Not sure if its 100% right but I just changed line 1114 of weblinks.module
from :
$wheres[] = 'AND n.uid=%s ';
to
$wheres[] = 'n.uid=%s ';
and I am no longer getting the warning
Comment #2
nancydruYou did the right thing. I can't believe I missed that one.
Comment #3
nancydru