好了,所以我有一個奇怪的奇情PHP的mysqli use_result限制古怪
我有一些代碼,看起來像這樣
public function select($sql, $params = false)
{
$output = false;
$this->_query = $this->escapeInto($sql, $params);
$this->_mysqli->real_query($this->_query);
$result = $this->_mysqli->use_result();
return $result;
}
現在,當我通過在下面的查詢
$this->_query = "SELECT * from bookings ORDER BY booking_id ASC limit 38500,500";
和整個函數永遠不會返回它將到達函數的末尾,我可以在那裏打印調試,但它永遠不會返回。
但是,如果我發送任何其他查詢,它工作正常。這兩個工作和所有增加到這一點500的工作。
$this->_query = "SELECT * from bookings ORDER BY booking_id ASC limit 38501,500";
$this->_query = "SELECT * from bookings ORDER BY booking_id ASC limit 38500,501";
我沒有問題,與其他任何的查詢僅這一項和mysqli的似乎是從這一功能工作正常 它只是不會退出。我假設它與mysqli有關的問題,但無法找到任何此類問題。
任何想法?
,當你進入這些你明白了什麼直接查詢MySQL? – Benjam
公平的問題。它工作正常,我得到了你所期望的。 –
在這種情況下,它可能是一個PHP錯誤。 – Benjam