Question: am new to Mysql 

I want to retrieve all the columns containing StrainName=M18 from the database , but am getting error. please help me in this

```
SELECT * 

strain.strainName,
feature.contigId,
feature.startPosition,
feature.stopPosition,
feature.orfId,
feature.orfType,
feature.funcClassification,
feature.rastId,
feature.strand 
from feature,strain 
where feature.id=strain.id and strainName='M18';

```

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'strain.strainName,feature.contigId,feature.startPosition,feature.stopPosition,fe' at line 1

Answer: 
Why can't you do this?

```
SomeClass::SomeClass( void ) : 
mFoo(new Foo)
, mBar(new Bar)
{
}

```

They are raw pointers and no unnecessary copies are created. 

I should also point out that the reason you use initializer lists is so that the object is in a valid state (that is, all members have valid values) when the constructor body is executed.

```
SomeClass::SomeClass( void )
{
     //before this point, mFoo and mBar's values are unpredictable
     mFoo = new Foo;
     mBar = new Bar;
}

```

Regarding exceptions, the destructor of SomeClass will not be called ONLY if the [exception is thrown inside the constructor itself](http://www.parashift.com/c++-faq-lite/selfcleaning-members.html).

Finally, regarding being thread safe or not, it depends on whether each thread has its own copy of SomeClass or not and whether SomeClass contains static members that are being written to.
`unique_ptr` is the right solution here. It has several advantages:

* It explicitly documents ownership. One of the issues with raw pointers is that they don’t indicate anything about who owns them. With `unique_ptr` you have a single owner, and must explicitly `move` ownership should you want to transfer it.
* It has essentially no overhead; the only thing `unique_ptr` does is invoke the deleter, which you were going to do anyway. Now you have the performance benefits of deterministic memory behaviour without the effort of manual memory management.
* It makes thread- and exception-safety much easier to attain, thanks to RAII. That means less fretting about instruction order, and less explicit cleanup code. You get the benefits of exceptions without all of the problems that caused them to be avoided in so much C++03 code.

`shared_ptr` is in my experience needed much less often than `unique_ptr`. Shared ownership is useful mainly when you have an immutable resource such as a texture or audio file, where loading and copying are both expensive, but which you want to unload when it’s not in use. `shared_ptr` also imposes the overhead of added safety (thread-safety in particular) and reference counting.

The disadvantage, of course, is that smart pointers impose a syntactic overhead. They are not as “native” as raw pointers. For that, you have `typedef`, `auto`, `decltype`, and rolling your own convenience functions such as `make_unique`.