Dear All,
I have some problem with duplicated field (deleted, it are in all table to identify deleted status). I open table with relation, when I delete a record but it show error as below.
I open with this command
I use TDolphin to access MySql Db.
​When I replace 'Y' in deleted field as
it show an error, how do I fix it? How to specific table with field in relation condition?
Thanks in advance for help and any idea.
I have some problem with duplicated field (deleted, it are in all table to identify deleted status). I open table with relation, when I delete a record but it show error as below.
MYSQL/1052 Column 'deleted' in field list is ambiguous
I open with this command
Function OpenDb(cTable, cQuery, cOrderBy, cTable1, cRelation1, cTable2, cRelation2, cTable3, cRelation3 )
local cFileName, cFile, cFullName
local cSql, oErr, oDb
.....
    cSql := "SELECT * FROM "+lower(cTable)+ ;
            iif(!empty(cTable1)," LEFT JOIN "+lower(cTable1)+" ON "+lower(cRelation1),"")+;
            iif(!empty(cTable2)," LEFT JOIN "+lower(cTable2)+" ON "+lower(cRelation2),"")+;
            iif(!empty(cTable3)," LEFT JOIN "+lower(cTable3)+" ON "+lower(cRelation3),"")+;
            iif(!empty(cQuery)," WHERE "+cQuery+" AND deleted<>'Y'","")+;  //
            iif(!empty(cOrderBy)," ORDER BY "+cOrderBy,"")
           Â
  oDb := MEMVAR->oServer:Query(cSql)
return oDbI use TDolphin to access MySql Db.
​When I replace 'Y' in deleted field as
oDb:deleted := 'Y'it show an error, how do I fix it? How to specific table with field in relation condition?
Thanks in advance for help and any idea.
Regards,
Dutch
FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)