本帖最后由 chibubao111 于 2009-08-30 17:08:41 编辑

解决方案 »

  1.   

    按理来讲...你在 execute 中跟了参数.. 
    就没有必要使用 bindValue 方法来传参了.另:两个参数应该是整形...
    so try:...
    $offset=intval('10');
    $pagesize=intval('10');
    $sqlstr="select * from test limit ? ,?;";
    $stmt=$dbconn->prepare($sqlstr);
    $stmt->execute(array($offset,$pagesize));
    ...
      

  2.   

    $stmt->execute(array($offset,$pagesize));
    改成$stmt->execute()即可,你绑了两次参数。
    要么用bindValue,要么就excute带参数。另外,调试时建议用var_dump,最好不要用print_r