title: how to retrive image from database in android
body: <p>I tried using this code to retrieve the image from database which is stored in <code>blob</code> format
  but this method does not work and my application crashes whenever this method is called 
  so how can I retrieve my image in byte or bitmap format from the database.
  because I want to use that <code>imageswitcher</code> </p>
  
  <p>My logcat shows</p>
  
  <pre><code>07-26 18:12:51.253: E/string1(15682): --Hatheesingh jain temple
  07-26 18:12:51.844: E/SQLiteLog(15682): (1) near "jain": syntax error
  07-26 18:12:51.884: E/AndroidRuntime(15682): FATAL EXCEPTION: main
  07-26 18:12:51.884: E/AndroidRuntime(15682): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.starting.starting/com.starting.starting.detailpage}: android.database.sqlite.SQLiteException: near "jain": syntax error (code 1): , while compiling: SELECT * FROM database WHERE place_name =Hatheesingh jain temple
  07-26 18:12:51.884: E/AndroidRuntime(15682):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
  07-26 18:12:51.884: E/AndroidRuntime(15682):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
  </code></pre>
  
  
  
  <pre><code>public byte[] get_image(String str){
  
      //openDataBase();
  
  
     Cursor c1 = checkDB.rawQuery("SELECT * FROM database WHERE place_name =" +str, null);
      byte[] img = c1.getBlob(10);
     return img;
      //CloseDataBase();
  
     }
  </code></pre>