SELECT tb_inport.id,tb_inport.goodsid,tb_goods.goodsname,tb_goods.price,tb_inport.number,tb_inport.price,tb_inport.providerid,tb_provider.providername,tb_inport.inporttime,tb_inport.operateperson FROM tb_inport,tb_goods,tb_provider where tb_goods.id=tb_inport.goodsid and tb_provider.id=tb_inport.providerid求这个查询的记录数...各位教下

解决方案 »

  1.   

    执行过你的SELECT语句后,再执行一下
    SELECT FOUND_ROWS();
    通过FOUND_ROWS() 就知道返回的记录数了。MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html
      

  2.   

    SELECT count(*)FROM tb_inport,tb_goods,tb_provider  where tb_goods.id=tb_inport.goodsid and tb_provider.id=tb_inport.providerid
      

  3.   

    SELECT FOUND_ROWS();这样获取上一个SQL查询的记录条数。
      

  4.   

    1、
    用SELECT COUNT(*) FROM (SELECT tb_inport.id,tb_inport.goodsid,tb_goods.goodsname,tb_goods.price,tb_inport.number,tb_inport.price,tb_inport.providerid,tb_provider.providername,tb_inport.inporttime,tb_inport.operateperson  FROM tb_inport,tb_goods,tb_provider  where tb_goods.id=tb_inport.goodsid and tb_provider.id=tb_inport.providerid) A
    2
    SELECT FOUND_ROWS()