Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » where2indexedArray failure (where2indexedArray of include.library.inc fails with a SQL sentence)
where2indexedArray failure [message #7367] Thu, 03 October 2019 13:12 Go to next message
edortizq is currently offline  edortizq
Messages: 82
Registered: August 2008
Location: Ecuador
Member

My _cm_validateUpdate function has the following code:

function _cm_validateUpdate ($rowdata, $originaldata) {
if ($rowdata['secuencia'] > $rowdata['secuenciafinal']) {
$this->errors['secuencia'] = getLanguageText('e0123');
}
if ($rowdata['idorganizador'] != $originaldata['idorganizador'] ||
$rowdata['ruc3ultimos'] != $originaldata['ruc3ultimos'] ||
$rowdata['emisor'] != $originaldata['emisor']) {
$idorganizador = $rowdata['idorganizador'];
$ruc3ultimos = $rowdata['ruc3ultimos'];
$emisor = $rowdata['emisor'];
$select = "select count(*) from secuencia where idorganizador = '$idorganizador' and ruc3ultimos = '$ruc3ultimos' and emisor = '$emisor'";
$yaexiste = $this->getData($select);
if ($yaexiste > 0) {
$this->errors['idorganizador'] = getLanguageText('e0124');
}
}
$autorizacionsri = $rowdata['autorizacionsri'];
$ok = $this->validarAutorizacion($autorizacionsri);
if ($ok == 0) {
$this->errors['autorizacionsri'] = getLanguageText('e0128');
}

return($rowdata);
}


The $select variable value is "select count(*) from secuencia where idorganizador = '7' and ruc3ultimos = '1' and emisor = '1'"
Debbuging "$yaexiste = $this->getData($select);" sentence it goes to the where2indexedArray of include.library.inc file, the $where parameter of this funcion is my $select variable.
On line 7362 of include.library.inc the sentence "$output2 = where2indexedArray($found);" does a recursive call with the $found variable value as "*"; then it goes to the line 7347 with "trigger_error("Cannot extract token from: '$where'", E_USER_ERROR);" sentence.

Please let me know if I'm doing something wrong.

My radicore version is 1.91.0

[Updated on: Thu, 03 October 2019 13:13]

Report message to a moderator

Re: where2indexedArray failure [message #7368 is a reply to message #7367] Fri, 04 October 2019 05:08 Go to previous message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
That version is hopelessly out of date. Please upgrade to the latest version which is 2.13.0

Previous Topic: LIST3 - no paging area for "middle" as of 2.10
Next Topic: Frequent file juggling woes
Goto Forum:
  


Current Time: Thu Nov 21 04:45:08 EST 2024

Total time taken to generate the page: 0.01196 seconds