这段是java代码,怎么转换成php mysql?
public static void main(String[] args) {
int totalNum = 13031;
int preNum = 1000;
int passNum = 0;
do {
System.out.println("select * from a limit " + passNum + "," + preNum);
passNum += preNum;
} while (passNum < totalNum);
}