Code:
$database = new PDO("firebird:dbname=C:[B][COLOR="Red"]\\[/COLOR][/B]Apache2[B][COLOR="Red"]\\[/COLOR][/B]htdocs[B][COLOR="Red"]\\[/COLOR][/B]guestbook_entries.GDB;host=localhost","SYSDBA", "masterkey");
$database = new PDO("firebird:dbname=C:[B][COLOR="Red"]\\[/COLOR][/B]Apache2[B][COLOR="Red"]\\[/COLOR][/B]htdocs[B][COLOR="Red"]\\[/COLOR][/B]guestbook_entries.GDB;host=localhost","SYSDBA", "masterkey");
<?php
$database = new PDO("firebird:dbname=C:\\Apache2\\htdocs\\guestbook_entries.GDB;host=localhost","SYSDBA", "masterkey");
$database->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$author = " ";
$time = 0;
$text = " ";
$sql = "
UPDATE
\"NEW_Table\"
SET
DATUM = '$time' , TEXT = '$text'
WHERE {AUTHOR = $author}
";
$stmn = $database->prepare($sql);
$author = " ";
$time = 0;
$text = " ";
$stmn->bindParam(":author" , $author , PDO::PARAM_STR);
$stmn->bindParam(":time" , $time , PDO::PARAM_INT);
$stmn->bindParam(":text" , $text , PDO::PARAM_STR);
$q = array(
array(
"AUTHOR" => "MrX",
"TEXT" => "Hallo...",
"DATUM" => 123456789
),
array(
"AUTHOR" => "MrZ",
"TEXT" => "Hallo...Ich bin Z",
"DATUM" => 1275554677
),
);
foreach($q as $query)
{
$author = $query["AUTHOR"];
$text = $query["TEXT"];
$time = $query["DATUM"];
$stmn->execute();
}
$stmn -> closeCursor();
?>
$sql = "UPDATE `NEW_TABLE`
SET `DATUM` = :time , `TEXT` = :text
WHERE `AUTHOR` = :author
";
$stmn = $databe->prepare($sql):
$author = " ";
$time = 0;
$text= " ";
$stmn->bindParam(":author" , $author , PDO::PARAM_STR);
$stmn->1bindParam(":time" , $time , PDO::PARAM_INT);
$stmn->bindParam(":text" , $text , PDO::PARAM_STR);
Kommentar