title: java.util.MissingFormatArgumentException: Format specifier: s
body: <p>I am trying to add data to SQLite database in android, But I am getting error, "java.util.MissingFormatArgumentException: Format specifier: s". I tried to figure out the problem but I can't find it. </p>
  
  <p>Button OnClickListener to add data to database.</p>
  
  <pre><code> addToCart.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              new Database(getBaseContext()).addToCart(new Order(
                      foodId,
                      foodItem.getName(),
                      quantity.getNumber(),
                      foodItem.getPrice(),
                      foodItem.getDiscount(),
                      foodItem.getImage()
              ));
  
              Toast.makeText(ItemDetailsActivity.this, "Item added to your basket.", Toast.LENGTH_SHORT).show();
  
          }
      });
  </code></pre>
  
  <p>Method to add</p>
  
  <pre><code>  public void addToCart(Order order){
      SQLiteDatabase db = getReadableDatabase();
      String query = String.format("INSERT INTO OrderDetails(Productid,ProductName,Quantity,Price,Discount,Image) VALUES('%s','%s','%s','%s','%s','%s');",
              order.getProductid(),
              order.getProductName(),
              order.getQuantity(),
              order.getPrice(),
              order.getDiscount());
      db.execSQL(query);
  }
  </code></pre>