Hi Together,
maybe someone can give me a hint. I can copy fields from master to Detail using code like this:
global $dal, $strTableName;
if ($_SESSION[$strTableName."_masterkey1"])
{
$tbldoc = $dal->Table("dok_adm_basis");
$rs = $tbldoc->Query("id=".$_SESSION[$strTableName.
"_masterkey1"],"");
if ($data = db_fetch_array($rs))
{
$_SESSION["x"] = $data["id"];
$_SESSION["xx"] = $data["docname"];
}
}
Master key field is "id" in Detail I fill in master id and master docname in x and xx with $_SESSION.
As Long I use numeric ID to link master and Detail field everything works perfect.
When I use the varchar docname field to link master and Detail i get an SQL error.
I changed this line of code to achieve this:
$rs = $tbldoc->Query("docname=".$_SESSION[$strTableName.
"_masterkey1"],"");
When I take a look at the error the SQL statement is without quotes.
So I tried hours to find out where to position the quotes without being successful.
Can someone pls help here.
THX
Andreas
Short update: I'm not sure anymore if this is only a Quote issue....
phpr9 mysql ...still a coding beginner