The command was
SELECT * FROM gallery WHERE name='2006regionconf'
and teh error was
No database selected