Stack Exchange
InvalidArgumentException when using Datastax to save data
I use Datastax to insert data into Cassandra. But I am getting exceptions in my output:
"Cassandra\Exception\InvalidArgumentException Object" 

[message:protected] => Invalid statement type
    [string:Exception:private] =>
    [code:protected] => 16777233

Why are these occurring and how can I resolve them?
Here is a snippet of code:
eg:
insert into invoice (type,type_id,driver_id,driver_name,customer_phone,order_detail,fee_detail,invoice_money,status,invoice_id,update_time,create_time) values (?,?,?,?,?,?,?,?,?,?,?,?)

[args] => Array
    (
     [0] => insert into invoice (type,type_id,driver_id,driver_name,customer_phone,order_detail,fee_detail,invoice_money,status,invoice_id,update_time,create_time) values (?,?,?,?,?,?,?,?,?,?,?,?)
      [1] => Cassandra\ExecutionOptions Object
       (
       )

      )

table :
CREATE TABLE invoice (
type int,
type_id bigint,
driver_id text,
driver_name text,
customer_phone text,
order_detail text,
fee_detail text,
invoice_money decimal,
status int,
invoice_id bigint ,
update_time bigint,
create_time bigint,
PRIMARY KEY (type_id, type),
);
CREATE INDEX ON invoice (invoice_id);
CREATE INDEX ON invoice (customer_phone);


could you provide invoice table description?

CREATE TABLE invoice (
type int,
type_id bigint,
driver_id text,
driver_name text,
customer_phone text,
order_detail text,
fee_detail text,
invoice_money decimal,
status int,
invoice_id bigint ,
update_time bigint,
create_time bigint,
PRIMARY KEY (type_id, type),
);
CREATE INDEX ON invoice (invoice_id);
CREATE INDEX ON invoice (customer_phone);

anything wrong?
