SELECT * FROM nieuws ORDER BY id DESC LIMI 1, 1
should be
SELECT * FROM nieuws ORDER BY id DESC LIMIT 1, 1
Unreason
2010-07-19 11:56:06
SELECT * FROM nieuws ORDER BY id DESC LIMI 1, 1
should be
SELECT * FROM nieuws ORDER BY id DESC LIMIT 1, 1
DESC LIMI -> DESC LIMIT, a typo. Listen to the error messages!
$select2 = mysql_query("SELECT * FROM nieuws ORDER BY id DESC LIMI 1, 1");
That error messages means your sql query failed. You should add some error checking code to display the mysql error when this happens.
if( !$select2 ) {
echo mysql_error();
}
I wouldn't leave this in production code but it's useful for debugging your code.
Always a good idea to read the manual:
http://www.php.net/manual/en/function.mysql-query.php
http://php.net/manual/en/function.mysql-error.php
http://www.php.net/manual/en/function.mysql-errno.php