I have some mysql_query()s that work just fine, but if I put them in an if else statement they return false. Any idea?
public function delete_post() {
$id = $_GET['post_id'];
mysql_query("DELETE FROM posts WHERE post_id='$id' LIMIT 1");
if ( !mysql_query() ) {
echo ('Could not be Deleted');
} else {
echo 'Deleted Successfully';
}
}
and when i run it, it deletes the post, but returns "Could not be deleted"