I am trying to fetch "bar_ids" from "foo" table using mysql-python. To this end, I got the following error and I am receiving only few bar_ids. How do I get this correctly without warning error?
My table is shown below:
create table foo (foo_id int, bar_id int, foo_name varchar(255))
My query & Error:
foo_ids = 16600, 16602, 16607, 16609, 16611, 16613
Warning: Data truncated for column 'bar_id' at row 1
cursor.execute("""select bar_id from foo where foo_id in (%s)""", (foo_ids,))
Warning: Truncated incorrect DOUBLE value: '16600, 16602, 16607, 16609, 16611, 16613'
cursor.execute("""select bar_id from foo where foo_id in (%s)""", (foo_ids,))