[Krename-users] Re: [Kbarcode] Patch for the serial stuff
Brought to you by:
domseichter,
stonki
From: Dominik S. <dom...@we...> - 2004-01-07 22:21:08
|
Hi, Am Mittwoch, 7. Januar 2004 23:18 schrieben Sie: > Yes, but contains() is faster than the SQL Query we do for some fields. > See the code example. If the contains() is removed, the behaviour of the > function is still correct, but we would always execute a SQL query which is > surely slower than the fast contains() function. > > if( SqlTables::isConnected() && t.contains( "["+c+"]" ) > && !article_no.isEmpty() ) { > QString ret = query( "SELECT " + c + " FROM " + > TABLE_CUSTOMER_TEXT + " WHERE article_no='" + article_no + "' AND > customer_no='" + customer_no + "'"); > t.replace( DSREPLACE( "["+c+"]" ), ret ); > } Answering to myself: There are indeed a few places where the contains call can be removed, but only at places where there is no SQL query done. Thanks for pointing this out! CU Dom -- ********************************************************************** Dominik Seichter - dom...@we... KRename - http://www.krename.net - Powerful batch renamer for KDE KBarcode - http://www.kbarcode.net - Barcode and label printing KESI - http://kesi.sf.net - KESI Easy SQL Import ********************************************************************** |