![](/img/trans.png)
[英]How to export mysql database structure only throught command line, but export some specific tables data from the specified in list
[英]How to export some rows in some tables in mysql database with condition by php function?
我編寫了一個 API 來從數據庫中導出數據。 我將導出 5 個表的數據: table_1, table_2, table_3, table_4, table_5
,條件相同where="clock>='.$from.' and clock <= '.$to.'"
where="clock>='.$from.' and clock <= '.$to.'"
考試: $from = 1564009035 and $to = 1564009215
如何編寫 SQL 查詢並在 PHP 函數中執行來做到這一點?
請幫助我,非常感謝,BienHV
如果你想以不同的結果導出 5 個表,你可以像這樣對每個表SELECT * FROM table_1
執行 sql 直到你的第五個表,然后如果你想將數據導出到 json 文件並且使用json_decode()
到你的 sql 結果將其用作 API
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.