Change field in database: fail

trancompany 06 Sep, 2009
Dear All,

I created a database with field "escrow_status" for tracking status of cart (payment or not).
This field is required edit in back ground --> dont have any text box for editing.

I write this code in CFs for editing database, but i update database.
Who can give me advices?


$db =& JFactory::getDBO();
$query = "
UPDATE ".$db->nameQuote(`jos_chronoforms_newescrow`)."
SET ".$db->nameQuote('escrow_status')." = 'waitmoney'
WHERE ".$db->nameQuote('cf_id')." =$index 
";

$db->setQuery($query);
$db->query();
GreyHead 06 Sep, 2009
Hi trancompany,

I think you are adding too many quotes round the table name. Either use
UPDATE ".$db->nameQuote('#__chronoforms_newescrow')."
or
UPDATE `#__chronoforms_newescrow` 

Bob
This topic is locked and no more replies can be posted.