This topic is locked

Data Access Layer - Documentation Error

10/10/2009 8:44:28 PM
PHPRunner General questions
K
KevinMillican author

The windows helpfile and online manual appear to contain an error with regard to "Bad" Table name conventions.
eg. they say :-

to access table with "bad" name use Table array i.e. $dal->Table["Order details"]
This was driving me mad until with some experimentation I found it should be:-

$dal->Table("Order details")

D
danaci 10/11/2009

include global $dal;

K
KevinMillican author 10/11/2009



include global $dal;


The problem isn't the variable $dal; I have defined it at the beginning of my code snippet. It's the square brackets instead of normal ones.
The working code snippet looks like this :-
global $strTableName,$dal,$myvalue;

$rstmp = $dal->Courses->Query("cID=".$_SESSION[$strTableName."_masterkey1"],"");

$datatmp = db_fetch_array($rstmp);

$myvalue=$datatmp["Course"];
$rstmp = $dal->->Query("ctID=".$myvalue,"");

$datatmp = db_fetch_array($rstmp);

$_SESSION["StandardPrice"]=$datatmp["Cost per Delegate"];
If I put ** my application throws an error but with the normal brackets it works exactly as expected.

J
Jane 10/12/2009

Hi,
thank you.

We'll fix it.