|
Posted by Jim Carlock on 05/17/07 18:23
function CreateMyDataBaseFile($FQFN, $UID, $PW) {
$db = "sqlite:" . $FQFN;
$sql = "CREATE TABLE Customers(name1 TEXT, name2 TEXT);";
$dbh = new PDO($db, $UID, $PW);
$dbh->exec($sql);
$dbh = null;
}
This works as long as a drive letter is not FQFN. For instance,
if, $FQFN = "Z:/mysql/dbn/data.db", PHP replies:
SQLSTATE[HY000] [14]
along with a couple lines of text identifying line numbers and such.
The function above works well if FQFN = "./data.db". But, the
database file must get set up on a different drive.
Thanks.
--
Jim Carlock
Post replies to the group.
Navigation:
[Reply to this message]
|