I have sql query but not work, i have notice:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE custom > 0' at line 1]
What i do wrong?
$query= "SELECT * FROM files ORDER BY id DESC LIMIT $from, $site WHERE custom > 0 "; $kategorie = $this->wpdb->get_results($query, ARRAY_A);
If i delete
"custom > 0" then works, but i need this.