I would like to give you the error log file but there is no error log file. It’s not in the folder that i wrote into the function. ($grid->enable_log("…/…/logfiles/error.log",true) Thats very strange.
Anyway now the table displays data because i found an error in my code. But when i try to insert something it didn’t work. When i try to insert new data in a row, the row is displayed red when i put new data in the cells.
This is my complete code:
[code]<?php
require_once("…/config.php");
$res=mysql_connect($mysql_server,$mysql_user,$mysql_pass);
mysql_select_db($mysql_db);
require("../../codebase/grid_connector.php");
$grid = new GridConnector($res);
$grid->enable_log("../../logfiles/error.log",true);
$grid->dynamic_loading(100);
$grid->sql->attach("Update","UPDATE SYS_LogCalls, SYS_LogCallDescription SET Source='{Source}', Num='{Num}', Msg='{Msg}', Application='{Application}', LogLevel='{LogLevel}', Text_en_US='{Text_en_US}' WHERE SYS_LogCalls.LogCallID = '{LogCallID}' AND SYS_LogCallDescription.LogCallID = '{LogCallID}'");
/*function my_insert($action)
{
$logcallid = $action->get_id();
$source = $action->get_value("Source");
$num = $action->get_value("Num");
$msg = $action->get_value("Msg");
$grid->sql->query("INSERT INTO SYS_LogCalls (LogCallID, Source, Num, Msg) VALUES ('{$logcallid}', {$source}', '{$num}'), '{$msg}'");
$newid = $action->get_new_id();
$lcdid = $action->get_id();
$application = $action->get_value("Application");
$loglevel = $action->get_value("LogLevel");
$text = $action->get_value("Text_en_US");
$grid->sql->query("INSERT INTO SYS_LogCallDescription (LcdID, LogCallID, Application, LogLevel, Text_en_US) VALUES ('{$lcdid}', '{$newid}', '{$application}', '{$loglevel}', '{$text}')");
$action->success();
}*/
$grid->render_sql("SELECT lc.LogCallID, lc.Source, lc.Num, lc.Msg, lcd.Application, lcd.LogLevel, lcd.Text_en_US FROM SYS_LogCalls lc JOIN SYS_LogCallDescription lcd ON lc.LogCallID = lcd.LogCallID", "LogCallID", "Source,Num,Msg,Application,LogLevel,Text_en_US");
?>[/code]
I just don’t understand why he does not write data in the two database tables…