用c++ builder和mysql编写的程序出错了,为什么
我用的的数据库是mysql,在其中有一个表bookinfo,我用命令查询时,记录都存在,但在c++ builder中就查不出结果,不知道是为什么,这是我c++ builder中的语句:
if(model==0)
booklistdata->CommandText="select idd,bookname,author from bookinfo where author='"+checkword+"'"order by bookname limit "+AnsiString(start)+","+line;
else
booklistdata->CommandText="select idd,bookname,author from bookinfo where author like '%"+checkword+"%' order by bookname limit "+AnsiString(start)+","+line;
比如说author这一列中有“张俊平”这一项,但却查不出来