dqf98772 2013-06-16 14:22
浏览 111

使用PHPExcel将筛选结果导出到Excel

I'm trying to build a report page for my company. I want to export the filtered results.

I built a page with dreamweaver on localhost. The query works well and gives me the results.

I then added a form (https://dl.dropboxusercontent.com/u/5326510/C74tables.php lines 316-324) with 3 hidden fields and a button to go to exportXLS.php when clicked. I have it working but it downloads all the rows in the table.

SELECT * FROM satislar WHERE satis_satici LIKE v3 AND satis_tarih between v1 and v2 ORDER BY satis_tarih DESC

(v1, v2 and v3 are the variables in the recordset)

exportXLS.php https://dl.dropboxusercontent.com/u/5326510/exportXLS.php exports all the rows not the filtered results.

How can I get the filtered results?

  • 写回答

1条回答 默认 最新

  • drn9573 2013-06-16 15:33
    关注

    Maybe you should change the line:

    $SQL='SELECT cus_id, mus_musteriadi, mus_pstnno, urun_satilanurun, satis_satici, satis_tarih FROM satislar';
    

    for:

    $SQL='SELECT cus_id, mus_musteriadi, mus_pstnno, urun_satilanurun, satis_satici, satis_tarih FROM satislar WHERE satis_satici LIKE v3 AND satis_tarih between v1 and v2 ORDER BY satis_tarih DESC';
    
    评论

报告相同问题?

悬赏问题

  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题