-1
我正在使用mysql。我想用數據庫連接使用光環SQL。如何使用aura sql進行數據庫連接?
<?php
$connection_factory = include '/Aura/scripts/instance.php';
$connection = $connection_factory->newInstance(
// adapter name
'mysql',
// DSN elements for PDO; this can also be
// an array of key-value pairs
'host=localhost;dbname=db_aura',
// username for the connection
'root',
// password for the connection
''
);
$result = $connection->fetchAll('SELECT * FROM tbl_test');
?>
上面的代碼顯示錯誤
解析錯誤:用C解析錯誤:\瓦帕\ WWW \ 1 \光環\ SRC \光環\ SQL \連接\ AbstractConnection.php第65行
您是否收到錯誤?你爲什麼問這是否正確,你有沒有嘗試過? –
SO是不是一個網站來證明你的代碼。人們來這裏得到「真實」(如代碼中)問題的答案! – Luceos
我試過但顯示錯誤?我怎麼能說出正確的,我的意思,對不起。 – next2u