The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Search SQL Error - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Search SQL Error (/showthread.php?tid=397) |
Search SQL Error - axel - Dec 12th, 2009 After I've searched for a submission inside of a Form, and the list of the results appear, now I get a SQL error. I only get the error when I do a search and then click to edit the submission. Code: Error: I checked, it's happening across Form Tools. RE: Search SQL Error - axel - Dec 13th, 2009 Interestingly enough, I found out that you may have modified something when you updated the Search Columns in the latest fix. On the ../global/code/submissions.php page, on line 594-595, there is a line with the variable $search_where_clause and when you remove it, My error goes away. I have no idea why this is happening. The $search_where_clause is built using the $form_id, $search_fields, $search_columns. Are any of those changed in this new version? Anyways, point being, Form Tools works again. Which makes my day! =] RE: Search SQL Error - Ben - Dec 13th, 2009 Thanks for this, Axel. Sorry you're having such a rough go of it lately. A couple of other folks noticed another problem in another thread, so I'll address this and that problem in today's build. - Ben RE: Search SQL Error - Ben - Dec 13th, 2009 Hey Axel, I did some testing and couldn't actually reproduce this one. However, the _ft_get_search_submissions_search_where_clause() function in submissions.php (which generates the AND clause for the search strings in the search function) isn't doing it's job very well. It *is* possible that it would be generating that dud SQL that you posted (I just can't figure out how to get it to do it!). So instead, I've updated the code to ensure that it only adds the AND clause if there's actually something there. I'll include this fix in today's build. Thanks again for the info - it was invaluable for tracking this one down. - Ben RE: Search SQL Error - alton - Dec 29th, 2009 Hi there, I haven't got any ideas, but I was wondering if you ever got a solution as I would like to do the same thing. Cheers! |