我的环境:mysql8 springboot 2.1
这是我的问题,我想使用jpa创建表顺序,但是当我运行项目时,它会显示错误消息。
如果我将 @Table(name =“ order”)更改为@Table(name =“`order`”),则可以。 我不确定哪里错了? 预先感谢
// Include the main TCPDF library (search for installation path).
require_once('{tcpdf_path}');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('{conf_title}');
$pdf->SetTitle('{title}');
$pdf->SetSubject('{conf_title} Abstracts');
$pdf->SetKeywords('{conf_title}, Abstract');
// set default header data
$pdf->SetHeaderData('','', '', '{conf_title}');
$pdf->setPrintHeader(true);
// set header and footer fonts
$pdf->setHeaderFont(Array('freeserif', '', 8));
// set margins
$pdf->SetMargins(20, 15, 20);
// set line height
$pdf->setCellHeightRatio(0.7);
// set image scale factor
$pdf->setImageScale(1.5);
// }
// ---------------------------------------------------------
// set font
$pdf->SetFont('freeserif', '', 11);
// add a page
$pdf->AddPage();
/* NOTE:
* *********************************************************
* You can load external XHTML using :
*
* $html = file_get_contents('/path/to/your/file.html');
*
* External CSS files will be automatically loaded.
* Sometimes you need to fix the path of the external CSS.
* *********************************************************
*/
// define some HTML content with style
$html = <<<EOF
<!-- html goes here - I've removed it for the question -->
EOF;
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');
// reset pointer to the last page
$pdf->lastPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('pdf_{entry_id}.pdf', 'I');
exit;
//============================================================+
// END OF FILE
//============================================================+
?>
答案 0 :(得分:0)
order
是MySQL中的保留字。需要使用引号将其转义