MyBB Community Forums

Full Version: 1054 - Unknown column 'Array' in 'where clause'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am running a MyBB 1.6.2 installation, with data merged from an SMF 2 board. All is running well, but I want to add a search box in the header (just like on the MyBB site), which is causing this SQL error. I placed the following code in the header template:

<form id="search_form" style="margin: 0;" action="search.php" method="post">
<input type="text" name="keywords" value="Search..." class="text"  />
	<select name="action" id="search_focus">
		<option value="do_search">site</option>
	</select>
<input type="submit" value="Search" class="button_submit" name="submit" />		
</form>

When I search using this form, I get this error:

SQL Error:
1054 - Unknown column 'Array' in 'where clause'

Query:
SELECT pid, tid FROM mybb_posts WHERE pid IN(Array) AND visible=1 ORDER BY dateline DESC

Strange thing is, this error shows up for most searches, but not all (if I search for "test", for example, I don't get the error). But for the searches that generate the error, I can use the regular search page which works fine with no errors at all.

I tried "file verification" in the tools menu, but no errors show up. Is there anything else I can try? Btw, I started out with a 1.6 board (I did not upgrade from 1.4).
Weird, but that code just works fine for me in my localhost, are you sure you're not missing anything here ?
because when i search something in the forum which doesn't exist, i get this
Quote:Test_Forum
Sorry, but no results were returned using the query information you provided. Please redefine your search terms and try again.

As expected...
I erased my database and merged my SMF 2 installation again, and now the search works as expected. Something must have gone slightly wrong during the first merge, but all is well now. Problem solved.
(2011-03-11, 04:46 PM)Vandaahl Wrote: [ -> ]I erased my database and merged my SMF 2 installation again, and now the search works as expected. Something must have gone slightly wrong during the first merge, but all is well now. Problem solved.

Great, glad that your problem is solved.