mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-25 18:59:12 +02:00
Fix error to execute insert query mysql for the missing column Trunscate.
This commit is contained in:
parent
e3e099680c
commit
43fb361258
@ -232,8 +232,12 @@ if ( isset($_POST['op']) )
|
||||
$myrow = DB_GetSingleRow($result, true);
|
||||
if ( !isset($myrow['FieldID']) )
|
||||
{
|
||||
//TODO: Trunscate NOT USED YET, it is currently set to 30 to avoid error mysql.
|
||||
// check "parsers.php" when using Truncate
|
||||
$content['Trunscate'] = 30;
|
||||
|
||||
// Add custom Field now!
|
||||
$sqlquery = "INSERT INTO " . DB_FIELDS . " (FieldID, FieldCaption, FieldDefine, SearchField, FieldAlign, DefaultWidth, FieldType, SearchOnline)
|
||||
$sqlquery = "INSERT INTO " . DB_FIELDS . " (FieldID, FieldCaption, FieldDefine, SearchField, FieldAlign, DefaultWidth, FieldType, SearchOnline, Trunscate)
|
||||
VALUES (
|
||||
'" . $content['FieldID'] . "',
|
||||
'" . $content['FieldCaption'] . "',
|
||||
@ -242,7 +246,8 @@ if ( isset($_POST['op']) )
|
||||
'" . $content['FieldAlign'] . "',
|
||||
" . $content['DefaultWidth'] . ",
|
||||
" . $content['FieldType'] . ",
|
||||
" . $content['SearchOnline'] . "
|
||||
" . $content['SearchOnline'] . ",
|
||||
" . $content['Trunscate'] . "
|
||||
)";
|
||||
$result = DB_Query($sqlquery);
|
||||
DB_FreeQuery($result);
|
||||
|
@ -233,8 +233,12 @@ if ( isset($_GET['op']) )
|
||||
// check if field is in define list!
|
||||
if ( !array_key_exists($myField['FieldID'], $fields) )
|
||||
{
|
||||
//TODO: Trunscate NOT USED YET, it is currently set to 30 to avoid error mysql.
|
||||
// check "fields.php" when using Truncate
|
||||
$content['Trunscate'] = 30;
|
||||
|
||||
// Add field into DB!
|
||||
$sqlquery = "INSERT INTO " . DB_FIELDS . " (FieldID, FieldCaption, FieldDefine, SearchField, FieldAlign, DefaultWidth, FieldType, SearchOnline)
|
||||
$sqlquery = "INSERT INTO " . DB_FIELDS . " (FieldID, FieldCaption, FieldDefine, SearchField, FieldAlign, DefaultWidth, FieldType, SearchOnline, Trunscate)
|
||||
VALUES (
|
||||
'" . $myField['FieldID'] . "',
|
||||
'" . $myField['FieldCaption'] . "',
|
||||
@ -243,7 +247,8 @@ if ( isset($_GET['op']) )
|
||||
'" . $myField['FieldAlign'] . "',
|
||||
" . $myField['DefaultWidth'] . ",
|
||||
" . $myField['FieldType'] . ",
|
||||
" . $myField['SearchOnline'] . "
|
||||
" . $myField['SearchOnline'] . ",
|
||||
" . $content['Trunscate'] . "
|
||||
)";
|
||||
$result = DB_Query($sqlquery);
|
||||
DB_FreeQuery($result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user