This is my python code:
cx=sqlalchemy.create_engine(u"mysql://username:password@ipaddress/database?charset=utf8")
metadata=sqlalchemy.MetaData(cx)
orm_obj=sqlalchemy.Table(u'I_POI',metadata,autoload=True)
sql=orm_obj.select(u'poi_id,poi_name').where(u'poi_id>1 and poi_id>0').limit(3).offset(0)
resultz=sql.execute()
for i in resultz:
print i
[DB] I_POI Table:poi_id,poi_name,poi_data1,poi_data2……poi_data10
I do it with existing database,but “select()” is no work..It still return total columns.
I want to get only some columns,please help me.
here is the code that works for me: