[Vtigercrm-developers] Has anyone addressed this data overwriting issue?

Sergio A. Kessler sergiokessler at gmail.com
Sat Feb 4 13:03:25 PST 2006


I don't follow...

maybe GetUpdateSQL() is not the function to use...

http://pear.php.net/manual/en/package.database.db.db-common.autoexecute.php

in that function you specify the 'where' condition...
as in $where = "table_id = $id";
(and you can't go wrong with the id)

there must be something like that in ADODB


/sak
ps: of course, last update wins

On 2/4/06, Mike Fedyk <mfedyk at mikefedyk.com> wrote:
> Joao Oliveira wrote:
>
> >On 2/4/06, Mike Fedyk <mfedyk at mikefedyk.com> wrote:
> >
> >
> >>The point is don't lock.  Just compare the data during the edit
> >>request.  The edit request will have to send both sets of data before
> >>and after the edit.
> >>
> >>See my post on the forum.  It will be out in a few minutes.
> >>
> >>
> >
> >why not to compute hash from original record and it ?
> >it will get fast when comparation takes place...
> >
> >
> >
> >
>
> Because of this feature JeffK pointed out:
>
> >http://phplens.com/adodb/reference.functions.getupdatesql.html#getupdatesql
> >
> >GetUpdateSQL(&$rs, $arrFields, $forceUpdate=false,$magicq=false,$forcenulls=false)
> >
> >Generate SQL to update a table given a recordset $rs, and the modified
> >fields of the array $arrFields (which must be an associative array holding
> >the column names and the new values) are compared with the current
> >recordset. If $forceUpdate is true, then we also generate the SQL even if
> >$arrFields is identical to $rs->fields. Requires the recordset to be
> >associative. $magicq is used to indicate whether magic quotes are enabled
> >(see qstr()).
> >
> >Since 4.52, we allow you to pass the $force type parameter, and this
> >overrides the $ADODB_FORCE_TYPE global variable.
> >
> >Since 4.62, the table name to be used can be overridden by setting
> >$rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is
> >called.
> >




More information about the vtigercrm-developers mailing list