<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello everyone,<br>
<br>
I'm trying to see if the autocompletion feature works OK with my
multilang fields (like title), and by inspecting script's code, I
saw this in lines 70-80:<br>
<br>
my $sql = "SELECT $Q_id" .<br>
" FROM $Q_table" .<br>
" WHERE ";<br>
if ($dataset_name eq "eprint") {<br>
$sql .= " $Q_eprint_status=" . $db->quote_value( "archive"
);<br>
}<br>
$sql .= " AND $Q_id!=$id" .<br>
" AND $Q_field_name IS NOT NULL" .<br>
" AND $Q_field_name " .<br>
$db->sql_LIKE() .<br>
$db->quote_value( EPrints::Database::prep_like_value( $q ) .
'%' );<br>
<br>
<br>
As we can see, and if I'm not terribly mistaken, if $dataset_name <b>neq</b>
"eprint", then the SQL WHERE statement is immediately followed by an
AND statement, which would cause SQL to fail.<br>
<br>
Am I missing something here or is it really a potential bug on non
records not belonging to the "eprint" dataset (not sure how it would
be triggered though)?<br>
<br>
<pre class="moz-signature" cols="72">--
George Mamalakis
IT and Security Officer,
Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
PhD (Aristotle Univ. of Thessaloniki),
MSc (Imperial College of London)
School of Electrical and Computer Engineering
Aristotle University of Thessaloniki
phone number : +30 (2310) 994379
</pre>
</body>
</html>