php操作mysql示范备忘录

php操作mysql示例备忘录1. 一般的insert$query SELECT name, points FROM Profile WHERE 1 ORDER BY po

php操作mysql示例备忘录

1. 一般的insert

$query = "SELECT name, points FROM Profile WHERE 1 ORDER BY points DESC LIMIT $_from, $_to";if ($result = $this->db->query($query)) {while ($row = $result->fetch_row()) {$ret = array ("name" => $row[0],"points" => $row[1],);}$result->close();}