Still problems with Quick search ??? V8

Hello,

anyone of you has the same annoying problem on V 8 ???
Quick search do not works and after a while it goes stucked.
You insert a text on search field and click on magnifier and then it do not find nothing also if the values are there.

Error send to this line code : if ($rx = $this->Ini->nm_db_conn_mysql->Execute($nm_comando))

On image the error

searchSC.png

Has you fields added in search options? SOmetimes error is not in the line specified, but previous. Copya/paste here from line 9765 to 9775

Hi Giu, thanks for reply.
I suppose that is something connected to a bug on process of importing from v 7 to v 8 but as usual… SC do not answers…
All old quick search do not find nothing… ;-(

Here is the code , if you like I can send you also tables …

9742
function SC_lookup_projectid($condicao, $campo)
{
$result = array();
$campo = substr($this->Db->qstr($campo), 1, -1);
$nm_comando = “SELECT description, projectID FROM projects WHERE (description LIKE ‘%$campo%’)” ;
if ($condicao == “ii”)
{
$nm_comando = str_replace(“LIKE ‘%$campo%’”, “LIKE ‘$campo%’”, $nm_comando);
}
if ($condicao == “df” || $condicao == “np”)
{
$nm_comando = str_replace(“LIKE ‘%$campo%’”, “NOT LIKE ‘%$campo%’”, $nm_comando);
}
if ($condicao == “gt”)
{
$nm_comando = str_replace(“LIKE ‘%$campo%’”, “> ‘$campo’”, $nm_comando);
}
if ($condicao == “ge”)
{
$nm_comando = str_replace(“LIKE ‘%$campo%’”, “>= ‘$campo’”, $nm_comando);
}
if ($condicao == “lt”)
{
$nm_comando = str_replace(“LIKE ‘%$campo%’”, “< ‘$campo’”, $nm_comando);
}
if ($condicao == “le”)
{
$nm_comando = str_replace(“LIKE ‘%$campo%’”, “<= ‘$campo’”, $nm_comando);
}
$_SESSION[‘scriptcase’][‘sc_sql_ult_comando’] = $nm_comando;
$_SESSION[‘scriptcase’][‘sc_sql_ult_conexao’] = ‘’;
if ($rx = $this->Ini->nm_db_conn_mysql->Execute($nm_comando))
{
while (!$rx->EOF)
{
$chave = $rx->fields[1];
$label = $rx->fields[0];
if ($condicao == “eq” && $campo == $label)
{
$result[] = $chave;
}
if ($condicao == “ii” && $campo == substr($label, 0, strlen($campo)))
{
$result[] = $chave;
}
if ($condicao == “qp” && strstr($label, $campo))
{
$result[] = $chave;
}
if ($condicao == “np” && !strstr($label, $campo))
{
$result[] = $chave;
}
if ($condicao == “df” && $campo != $label)
{
$result[] = $chave;
}
if ($condicao == “gt” && $label > $campo )
{
$result[] = $chave;
}
if ($condicao == “ge” && $label >= $campo)
{
$result[] = $chave;
}
if ($condicao == “lt” && $label < $campo)
{
$result[] = $chave;
}
if ($condicao == “le” && $label <= $campo)
{
$result[] = $chave;
}
$rx->MoveNext() ;
}
return $result;
}
elseif ($GLOBALS[“NM_ERRO_IBASE”] != 1)
{
$this->Erro->mensagem(FILE, LINE, “banco”, $this->Ini->Nm_lang[‘lang_errm_dber’], $this->Ini->nm_db_conn_mysql->ErrorMsg());
exit;
}
}
9824

Well, my eyes is burning right now lol.

Socio / Assoc is projectid?

Sorry, I didn’t readed the cause of your error in your image.

Try enabling Application-> Configuration-> Debug and see what SQL is firing.

SOrry if I’m not more of help, It’s Sunday and I’m working since 7:00 am :frowning:

Thanks in any case

Socio / Assoc is the ID of each team member of Motoclub

(mysqlt): SELECT count(*) from payments where 1 <> 1 (mysqlt): SELECT paymentID, memberID, payment_cbID, payment_timingID, payment_casusal_ID, payment_ledgerID, checkNumber, paymentDate, paydescr, amount_in, amount_out, currency, exchange_rate, note, cashin_type, cashout_type, account_ID, service_typeID, projectID, filedoc, filedoctext, fileimg, filesize, receiptID, receiptDate, InvoiceID, InvoiceDate, customerID, vendorID, amount_vat_escl, amount_vat_incl, amount_vat from payments WHERE (1 <> 1) order by paymentID DESC LIMIT 0,1 (mysqlt): SELECT memberID, concat(contactLastName, " ", memberName) FROM members WHERE year_card_actual = Year(CURDATE()) ORDER BY contactLastName, memberName (mysqlt): SELECT payment_cbID, concat(abbreviation, " - ", description) FROM payments_cb WHERE language_code = ‘it_IT’ ORDER BY payment_cbID (mysqlt): SELECT payment_casusal_ID, concat(abbreviation, " - ", description) FROM payments_causal WHERE language_code = ‘it_IT’ ORDER BY payment_casusal_ID (mysqlt): SELECT payment_timingID, concat(abbreviation, " - ", description) FROM payments_timing WHERE language_code = ‘it_IT’ ORDER BY payment_timingID (mysqlt): SELECT payment_ledgerID, concat(abbreviation, " - ", description) FROM payments_ledger WHERE language_code = ‘it_IT’ ORDER BY payment_ledgerID (mysqlt): SELECT service_typeID, descri FROM service_type WHERE language_code = ‘it_IT’ ORDER BY descri (mysqlt): SELECT account_ID, concat(code, " - ", descri) FROM accounts ORDER BY sign DESC, code ASC, descri (mysqlt): SELECT projectID, description FROM projects ORDER BY description (mysqlt): SELECT payment_typeID, descri FROM payments_type WHERE sign = “+” AND language_code = ‘it_IT’ ORDER BY descri (mysqlt): SELECT payment_typeID, descri FROM payments_type WHERE sign = “-” AND language_code = ‘it_IT’ ORDER BY descri (mysqlt): SELECT currencyID, curr_abbrev FROM currencies ORDER BY curr_abbrev (mysqlt): SELECT CustomerID, CompanyName FROM customers ORDER BY CompanyName (mysqlt): SELECT SupplierID, CompanyName FROM suppliers ORDER BY CompanyName