// I wrote:
SELECT * FROM `wallposts` WHERE '%searchterm%' IN( `content`,`username` )
// you wrote:
SELECT * FROM 'wallposts' WHERE '%$searchq%' IN('content','username')
These are different. Identifiers (e.g., table/column names) are delimited with backticks ( ` ); strings are delimited with apostrophes ( ' ).
Backticks aren’t always necessary (you can safely leave them off in this case), but IMO they’re a good habit to get into. They can prevent problems where a table/column name conflicts with a reserved word:
SELECT key FROM table WHERE values = 'whatever'
# causes an SQL error, since KEY, TABLE, and VALUES are all reserved words
SELECT `key` FROM `table` WHERE `value` = 'whatever'
# works fine
Obviously, the best solution to this is to not use reserved words as your table/column names. However, there are quite a lot of them, some are obscure, new ones are added from time to time, and sometimes the word is such a “natural choice” for your data structure that you completely overlook the conflict — so I feel it’s best to be explicit about it.
(On most US keyboards, the backtick key is next to the 1 key, top left.)
[ edit ] p.s.:
If this is a new project, you might consider using mysqli (or PDO) instead of the mysql extension. ext_mysql is outdated (since MySQL 5) and is scheduled to be deprecated.