How to export some rows of a mysql table with where clause from a php script?

后端 未结 4 1022
无人共我
无人共我 2021-01-04 08:45

I have a mysql table say test and I want to create a importable .sql file for rows where id is between 10 and 100 using php script.

I want to create a sql file say t

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-04 08:48

    Mysql Shell command

    mysqldump -u user -p password -h host Database Table --where="Condition"> /path/exportFile.sql
    

    Example

    mysqldump -u user -p 123456 -h host Database Student --where="age > 10"> /path/exportFile.sql
    

提交回复
热议问题