Canh
|
| Posted: 06/02/2003, 3:08 PM |
|
I've built a site and store SiteTitle and SiteLogo in table SiteTbl. I want to build a page that open content of table SiteTbl and can update them. How can i do?
I used Record Builder but it needed primary key, so i specify SiteTitle as primary key, and then, i deleted 2 following lines :
// $this->wp->AddParameter("1", "urlSiteTitle", ccsText, "", "", $this->Parameters["urlSiteTitle"], "", false);
and
// $this->wp->Criterion[1] = $this->wp->Operation(opEqual, "SiteTitle", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsText),false);
and added 2 lines into BeforeShow Event
global $sitetbl;
$sitetbl->EditMode = TRUE;
So when I opened this page, it showed automatically the content and i can update.
Anyone else has another solution? Help me pls.
Canh
|
|
|
 |
RonB
|
| Posted: 06/02/2003, 4:09 PM |
|
If the primary key is the trouble why not add a field in your table that has an auto increment value and use it as primary key?
Ron
|
|
|
 |
rclayh
|
| Posted: 06/03/2003, 5:52 PM |
|
Well the easiest way to do this in CCS is build a grid that lets you browse the contents of the table and link to a maintenance screen. I would use the application builder. Just follow the instructions on the screen and it will do exactly what you want with NO coding at the level you are currently working at.
|
|
|
 |
|