Changeset 2776 for trunk/tools/database/db.cpp
- Timestamp:
- Feb 14, 2000, 6:18:31 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/database/db.cpp
r2773 r2776 1 /* $Id: db.cpp,v 1. 9 2000-02-14 13:49:13bird Exp $ *1 /* $Id: db.cpp,v 1.10 2000-02-14 17:18:31 bird Exp $ * 2 2 * 3 3 * DB - contains all database routines. … … 412 412 MYSQL_ROW row; 413 413 int rc; 414 char szQuery[ 256];414 char szQuery[1024]; 415 415 416 416 /* … … 449 449 if (lDll >= 0 && pFnFindBuf->cFns != 0) 450 450 { 451 int cFnsThisDll, cFnsAliasesAndThisDll, i ;451 int cFnsThisDll, cFnsAliasesAndThisDll, i, f; 452 452 453 453 /* … … 547 547 */ 548 548 sprintf(&szQuery[0], "UPDATE function SET aliasfn = (-2) " 549 "WHERE (",549 "WHERE refcode IN (", 550 550 lDll, pszFunctionName); 551 for (i = 0; i < cFnsThisDll; i++) 552 { 553 if (i != 0) strcat(&szQuery[0], " OR"); 554 sprintf(&szQuery[strlen(szQuery)], " refcode = %ld", pFnFindBuf->alRefCode[i]); 555 } 551 for (f = 0, i = 0; i < cFnsThisDll; i++) 552 if (pFnFindBuf->alAliasFn[i] != ALIAS_DONTMIND) 553 sprintf(&szQuery[strlen(&szQuery[0])], 554 f++ != 0 ? ", %ld" : "%ld", pFnFindBuf->alRefCode[i]); 556 555 strcat(&szQuery[0], ") AND aliasfn <> (-2)"); 557 558 rc = mysql_query5(pmysql, &szQuery[0]); 556 if (f > 0) 557 rc = mysql_query5(pmysql, &szQuery[0]); 558 else 559 rc = 0; 559 560 if (rc >= 0 && cFnsAliasesAndThisDll < pFnFindBuf->cFns) 560 561 { … … 566 567 pFnFindBuf->alRefCode[0]); 567 568 for (i = cFnsAliasesAndThisDll; i < pFnFindBuf->cFns; i++) 569 { 568 570 sprintf(&szQuery[strlen(&szQuery[0])], 569 i > 0 ? ", %ld" : "%ld", pFnFindBuf->alRefCode[i]); 571 i > cFnsAliasesAndThisDll ? ", %ld" : "%ld", pFnFindBuf->alRefCode[i]); 572 } 570 573 strcat(&szQuery[0], ")"); 571 574 rc = mysql_query6(pmysql, &szQuery[0]); … … 780 783 { 781 784 sprintf(pszQuery, "UPDATE parameter SET type = '%s', name = '%s' " 782 "WHERE function = (%ld) AND sequencenbr = =(%ld)",785 "WHERE function = (%ld) AND sequencenbr = (%ld)", 783 786 pFnDesc->apszParamType[i] != NULL ? pFnDesc->apszParamType[i] : "", 784 787 pFnDesc->apszParamName[i] != NULL ? pFnDesc->apszParamName[i] : "",
Note:
See TracChangeset
for help on using the changeset viewer.