Forum Webscript.Ru
Общие => Базы данных => Тема начата: serg007 от 06 Мая 2004, 00:06:13
-
Подскажите что делает этот запрос в MySQL
$this->count_1 = mysql_query("SELECT count(id) AS number FROM $this->table") or die ("Query failed!");
while ($count = mysql_fetch_array($this->count_1)) {
$total_entries = $count["number"];
}
И еще один запрос
$this->tort = mysql_query("SELECT id, name, email, message, date FROM $this->table ORDER BY id DESC LIMIT $offset, $per_page") or die ("Query failed!");
while ($row = mysql_fetch_array($this->tort))
-
1. возвращает в переменную количество записей в таблице
2. возвращает $per_page рядов с полями id, name, email, message, date в записях начиная с ряда $offset
ну и к чему этот вопрос собсно был?
-
Для дальнейшего развития