获取最新的newspost数据库

Jer*_*eer 0 php mysql

我正试图从我的数据库中获取最新的帖子.如果我运行以下代码,我收到以下消息:

"无效的查询:您的SQL语法中有错误;请查看与您的MySQL服务器版本对应的手册,以便在第2行的'新闻邮件或新闻邮件的新闻邮件.post_id DESC'附近使用正确的语法"

<?php
            $getPosts = mysql_query("SELECT newsposts.post_id, newsposts.post 
                     FROM TABLE newsposts 
                 ORDER BY newsposts.post_id DESC 
                    LIMIT 1") or die('Invalid query: ' . mysql_error());
            while($getPosts_Array = mysql_fetch_array($getPosts)){

                $post_id = $getPosts_Array['post_id'];
                $post = $getPosts_Array['post'];

                echo "  
                            $post;


                ";
            }
        ?>
Run Code Online (Sandbox Code Playgroud)

Ohg*_*why 6

在SQL语句中删除"TABLE",因为该FROM子句假定为表.