Good afternoon all,
I have a question that I’m hoping someone can some can help me on. I have been looking at PHP connector reference and PHP connector formatting to understand how to insert an image using beforeRender.
<?php
require_once("../_dhtmlx/grid_server/codebase/connector/grid_connector.php");
require_once("../_dhtmlx/grid_server/codebase/connector/form_connector.php");
require_once("../_dhtmlx/grid_server/codebase/connector/db_mysqli.php");
$server = "";
$user = "";
$pass = "";
$mysql_db = "";
$mysqli = new mysqli($server, $user, $pass, $mysql_db);
$gridConn = new GridConnector($mysqli,"MySQLi");
$formConn = new FormConnector($mysqli,"MySQLi");
//this is my test to see if it grabs the data and insert it into test
function formatting($data){
//save in userdata
$data->set_userdata("test",$row->get_value("gradelevel"));
}
$type = $_GET["type"];
if($type=="grid") {
//$gridConn->event->attach("beforeRender","formatting");
$gridConn->render_table("reported","id","gradelevel, playername,report_date","test");
} else if($type=="form") {
$formConn->render_table("reported","id","playername,report_date,reason,nexon_report,evidence_a,evidence_b,evidence_c,evidence_d,evidence_e,evidence_f,username");
}
“test” is going to be where the image goes for a delete image. But the event is a test to see if it outputs to a field that doesn’t exist.
So how do I insert another column that doesn’t exist and place an image in there. Let me know if you need any more clarification.