Hello Jeff, below the sample query, the one which is commented is working under Linux (this is the one I need) , but gives an empty result under Windows, then I removed the field artnummer wich is also a string field, then I got some results but the result looks like a simple OR between (artbez_' . $isLang . ' LIKE ?) OR (artkurz_' . $isLang .' LIKE ?). I am not accessing at the same time under Linux and Windows, I am about to move the Programm from Linix to Windows. The Version of SQL::Statement under Windows is 1.005
# my $searchsqlstring = 'SELECT * from artikel WHERE ((artbez_' . $isLang . ' LIKE ?) OR (artkurz_' . $isLang .' LIKE ?) OR (artnummer LIKE ?)) AND ' . # '((artbez_' . $isLang . ' LIKE ?) OR (artkurz_' . $isLang .' LIKE ?) OR (artnummer LIKE ?)) AND ' . # '((artbez_' . $isLang . ' LIKE ?) OR (artkurz_' . $isLang .' LIKE ?) OR (artnummer LIKE ?))'; my $searchsqlstring = 'SELECT * from artikel WHERE ((artbez_' . $isLang . ' LIKE ?) OR (artkurz_' . $isLang .' LIKE ?)) AND ' . '((artbez_' . $isLang . ' LIKE ?) OR (artkurz_' . $isLang .' LIKE ?)) AND ' . '((artbez_' . $isLang . ' LIKE ?) OR (artkurz_' . $isLang .' LIKE ?))'; $sth = $DBH -> prepare ($searchsqlstring) or die "SELECT von artikel nicht moeglich."; $search4 = $search1; $search5 = $search2; $search6 = $search3; $search1 = '%' . $search1 . '%'; $search2 = '%' . $search2 . '%'; $search3 = '%' . $search3 . '%'; $search4 = $search4 . '%'; $search5 = $search5 . '%'; $search6 = $search6 . '%'; # $sth -> execute($search1, $search1, $search4, $search2, $search2, $search5, $search3, $search3, $search6) or die "SELECT von artikel nicht moeglich."; $sth -> execute($search1, $search1, $search2, $search2, $search3, $search3) or die "SELECT von artikel nicht moeglich."; ----- Original Message ----- From: "Jeff Zucker" <[EMAIL PROTECTED]> To: "Peter Schuberth" <[EMAIL PROTECTED]>; "dbi-users" <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 7:07 PM Subject: Re: DBD::CSV > Peter Schuberth wrote: > > >On the same hardware system > >the same select for the same table > > > Please check your version of SQL::Statement which is the module that > determines the speed and capabilities of DBD::CSV. Put these two lines > at the top of the scripts: > > use SQL::Statement; > print $SQL::Statement::VERSION; > > It sounds to me like you may have the XS version of the module on one > install and the pure perl version on the other. You can read about the > difference between the two at > > http://www.vpservices.com/jeff/programs/sql-compare.html > > If you have a moderately large data set and speed is an issue, then the > XS version will be better but MySQl, PostgreSQL, or SQLlite will be even > faster. DBD::CSV is really meant for relatively small data sets and > relatively uncomplicated querries. > > Another issue: if you are trying to access the same data file from both > windows and linux, you'll need to specifically set the csv_eol for the > table. It doesn't really matter which you choose, either "\015\012" or > "\012". If the script sets it to either one of those and the data > matches, then the same file can be accessed from both windows and linux > without changing the file or the script. That sort of multi-platform > accessibility can be achieved with the other DBDs, but probably not as > simply. > > You may be running into some bugs I am working on relatvie to > parentheses in WHERE clauses. I'd appreciate it if you could send me > any sample queries that don't work for you. > > -- > Jeff > >
