write to code without prefix table name I work on D7, My Sql database name is dbdrupal7 and all table prefix with abc (abc_block, abc_node, ...), website work fine. I create a custom table without prefix abc (custom). I create a module and write to custom code. 

$query = db_select('custom', 'c'); 

$query-&gt;fields('c');

$results = $query-&gt;execute();


...

...

Show "unexpected Error" when browse.

I not want to change table name custom to abc_custom in database. 

My question is how write correct code db_select('custom', 'c'); without prefix.
That behaviour is hard-coded with a SelectQuery; the prefix will apply to all tables, without exception, and there's no mechanism in place to override it. It happens in SelectQuery::__toString() if you're interested.

If you want to change that, you'll need to subclass SelectQuery, add a mechanism to let the class know which tables should/shouldn't be prefixed, and override the __toString() method to take that into account. Then you'll need your own version of db_select(), which uses your new custom version of the class.

All that's probably not worth the effort given that you can run an arbitrary SQL string with db_query(). For example, the following won't attempt to prefix custom:

db_query('SELECT * FROM custom c')