Sometimes phpMyAdmin generates queries like:
SELECT *
FROM `items`
WHERE 1
LIMIT 0 , 30
I wonder if WHERE 1
has any meanin
WHERE 1
is a synonym for "true" or "everything."
It's a shortcut so they don't have to remove the where clause from the generated SQL.
Otherwise, you would write something like this:
$sql = "SELECT * FROM `errors`";
if ($hasWhereClause == true) {
$sql .= " WHERE $whereClause";
}
$sql .= "LIMIT 0 , 30";