I'm getting the following error when I go to export the views definition:

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 twtid IN (1,2,3,4,6,7)' at line 2 query: SELECT twtid, tablename, dbconnection FROM tw_tables AND twtid IN (1,2,3,4,6,7) in /sites/all/modules/tw/tw_tablebuild.inc on line 44.

It looks like it's either missing the first WHERE clause, or needs to remove the AND when there's only one. I saw this as I was about to leave the office, so I'll try to check it out further this weekend and attempt a patch if I find it.

CommentFileSizeAuthor
#1 806014.patch418 bytesmdorman

Comments

mdorman’s picture

StatusFileSize
new418 bytes

I replaced the AND with WHERE, since there were no previously defined WHERE clauses in the $sql variable. So far this worked for me, but there was obviously another WHERE clause in previous versions, so there might be other issues.

betz’s picture

I can confirm the error.

jimmynash’s picture

I ran into the error as well. So far the patch in #1 has worked for me.

tom_o_t’s picture

Status: Active » Reviewed & tested by the community

Confirming both the problem and that the patch in #1 works.

andrewlevine’s picture

You can see clearly where this bug came from in the following link. Not quite sure how this bug hasn't seen more activity since it breaks exporting tables in 6.x-1.2.

http://drupalcode.org/viewvc/drupal/contributions/modules/tw/tw_tablebui...

scottprive’s picture

Same problem, reproduced on a clean install of latest modules.

scottprive’s picture

Priority: Normal » Critical

I trust that this is a showstopper for many, priority re-set.

scottprive’s picture

I reverted to version 1.1 and do not get the error. If applying a patch is not an option for you, 1,1 may be.

mikeryan’s picture

Status: Reviewed & tested by the community » Fixed

Fix committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.