0
我想從表tblTermDate中選擇一條記錄。兩者的輸出都是1。有數據輸入到字段中,並且這兩個日期的格式都是VARCHAR。任何幫助,將不勝感激謝謝!試圖選擇使用php的sqlite數據庫中的記錄
<?php
// create or open database called TimeTable.sqlite
$db = @sqlite_open("TimeTable.sqlite");
//Get Start Date from Table
$StartDate = @sqlite_exec($db, "SELECT fldStartDate FROM tblTermDate WHERE fldTerm_Name ='Christmas 1st Half' ");
//Print Start Date
echo $StartDate;
echo "<br> </br>";
//Get Start Date from Table
$EndDate = @sqlite_exec($db, "SELECT fldEndDate FROM tblTermDate WHERE fldTerm_Name ='Christmas 1st Half' ");
//Print End Date
echo $EndDate;
//Database Close
@sqlite_close($db);
?>
您是否閱讀過[documentation](http://www.php.net/manual/en/function.sqlite-exec .PHP)?如果語句成功,則sqlite_exec返回1。 –