Fix Phpunit issue

This commit is contained in:
jfefe 2018-03-11 16:48:26 +01:00
parent 2464fadf03
commit c3fab4c54c

View File

@ -73,7 +73,8 @@ class mod_ticketsup_simple extends ModeleNumRefTicketsup
$posindice = 8;
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max";
$sql .= " FROM " . MAIN_DB_PREFIX . "ticketsup";
$sql .= " WHERE ref LIKE '" . $this->prefix . "____-%'";
$search = $this->prefix . "____-%";
$sql .= " WHERE ref LIKE '" . $search ."'";
$sql .= " AND entity = " . $conf->entity;
$resql = $db->query($sql);
if ($resql) {
@ -107,7 +108,8 @@ class mod_ticketsup_simple extends ModeleNumRefTicketsup
$posindice = 8;
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max";
$sql .= " FROM " . MAIN_DB_PREFIX . "ticketsup";
$sql .= " WHERE ref like '" . $this->prefix . "____-%'";
$search = $this->prefix . "____-%";
$sql .= " WHERE ref LIKE '" . $search ."'";
$sql .= " AND entity = " . $conf->entity;
$resql = $db->query($sql);