This topic is locked

Hide ad button after certail amount of records

1/16/2011 8:26:33 AM
PHPRunner General questions
M
mmponline author

I need to hide the ad button (and inline button) after certain amount of recors was added.

This code is given in another post, but the button does not hide.

global $strTableName;

$rstmp = CustomQuery("select count(*) as count_R from listing where ListID='".$_SESSION["_".$strTableName."_OwnerID"]."'");

$datatmp = db_fetch_array($rstmp);if ($datatmp["count_R "]>1)$xt->assign("add_link",false);


Why doesn't it work?
The plot thickens.
I have a table with a related table. I want the add link on the related table to hide based on a value on the mauin table.

Eg.

If listingoption filed's value is Gold (in main table)

hide the add button on the related table after 20 records
If listingoption filed's value is Silver(in main table)

hide the add button on the related table after 10 records
etc.
Please help

M
mmponline author 1/24/2011

Still need help on this, please.