当前位置: 首页>>代码示例>>PHP>>正文


PHP GridConnector::render_sql方法代码示例

本文整理汇总了PHP中GridConnector::render_sql方法的典型用法代码示例。如果您正苦于以下问题:PHP GridConnector::render_sql方法的具体用法?PHP GridConnector::render_sql怎么用?PHP GridConnector::render_sql使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GridConnector的用法示例。


在下文中一共展示了GridConnector::render_sql方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: usersAction

 public function usersAction()
 {
     require_once '../vendor/dhtmlx/dhtmlxConnector/codebase/grid_connector.php';
     $database_host = $this->container->getParameter('database_host');
     $database_port = $this->container->getParameter('database_port');
     $database_name = $this->container->getParameter('database_name');
     $database_user = $this->container->getParameter('database_user');
     $database_password = $this->container->getParameter('database_password');
     $conn = mysql_connect($database_host, $database_user, $database_password);
     mysql_select_db($database_name);
     $data = new \GridConnector($conn);
     $sql = "select ID,USERNAME,EMAIL,LOCKED,EXPIRED,'ACTIVE' as STATUS\n        from arii_user\n        order by username";
     $data->event->attach("beforeRender", array($this, "color_rows"));
     $data->render_sql($sql, "ID", "USERNAME,EMAIL,STATUS");
 }
开发者ID:AxelANGENAULT,项目名称:CoreBundle,代码行数:15,代码来源:DBController.php

示例2: jobsAction

 public function jobsAction()
 {
     require_once '../vendor/dhtmlx/dhtmlxConnector/codebase/grid_connector.php';
     $database_host = $this->container->getParameter('database_host');
     $database_port = $this->container->getParameter('database_port');
     $database_name = $this->container->getParameter('database_name');
     $database_user = $this->container->getParameter('database_user');
     $database_password = $this->container->getParameter('database_password');
     $conn = mysql_connect($database_host, $database_user, $database_password);
     mysql_select_db($database_name);
     $data = new \GridConnector($conn);
     $qry = "select name,title,spooler_id,process_class,visible from joe_job order by name";
     $data->event->attach("beforeRender", array($this, "render_jobs"));
     $data->render_sql($qry, 'ID', 'name,title,spooler_id,process_class,visible');
 }
开发者ID:cleverage,项目名称:JOEBundle,代码行数:15,代码来源:DBController.php

示例3: GridConnector

<?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("temp.log", true);
$grid->dynamic_loading(100);
$grid->render_sql("SELECT grid50000.item_id as ID , grid50000.item_nm FROM grid50000", "item_id(ID)", "grid50000.item_id(ID),item_nm");
开发者ID:quantrocket,项目名称:planlogiq,代码行数:10,代码来源:01a_sql_basic_connector.php

示例4: GridConnector

<?php

require_once "../config.php";
$res = mysql_connect($mysql_server, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db);
require "../../codebase/grid_connector.php";
$gridConn = new GridConnector($res);
$sql = "SELECT * FROM grid50";
$gridConn->render_sql($sql, "item_id", "item_nm,item_cd");
开发者ID:elsonvinicius,项目名称:framework,代码行数:9,代码来源:01a_sql_basic_connector.php

示例5: GridConnector

<?php

require_once "../dhtmlx/connector_codebase/grid_connector.php";
$res2 = mysql_connect("localhost", "root", "");
mysql_select_db("company");
session_start();
$invno = strip_tags($_SESSION['invnumber']);
$conn2 = new GridConnector($res2, "MySQL");
$conn2->dynamic_loading(30);
// limited the loading data details
if ($invno != null) {
    $conn2->render_sql("Select * from `ivdetailtable`  where  `InvNumber`='{$invno}'", "id", "InvNumber,itemid,Description,UOM,Quantity,UnitPrice,ItemPrice");
} else {
    $conn2->render_sql("Select * from `ivdetailtable`  where  `InvNumber`='0'", "id", "InvNumber,itemid,Description,UOM,Quantity,UnitPrice,ItemPrice");
    //$conn2->render_table("ivdetailtable","id","InvNumber,itemid,Description,UOM,Quantity,UnitPrice,ItemPrice"); //"table ","id" for table,"data column" for table
    $conn->sql->attach("DELETE", "DELETE * FROM `ivdetailtable` WHERE `itemid` = 0");
}
开发者ID:ray1992x,项目名称:Creditor_Module_v3,代码行数:17,代码来源:invoicedetail.php

示例6: GridConnector

<?php

require_once "../dhtmlx/connector_codebase/grid_connector.php";
$res = mysql_connect("localhost", "root", "");
mysql_select_db("company");
session_start();
$potemp = strip_tags($_SESSION['number']);
$conn = new GridConnector($res, "MySQL");
$conn->dynamic_loading(30);
// limited the loading data details
if ($potemp != null) {
    //$conn->sql->attach("INSERT","INSERT into `podetailtable` (`POtemp`) VALUES ($potemp)");
    //$po_i=$_SESSION['i']+=intval(1));
    //$conn->sql->attach("INSERT","INSERT into `podetailtable` (`itemid`,`POtemp`) VALUES ($po_i,$potemp)"); //each ponumber insert into the item dfor reference
    $conn->render_sql("Select * from `podetailtable`  where  `POtemp`='{$potemp}'", "id", "POtemp,itemid,Description,booktitle,author,price");
} else {
    //session_destroy();
    $conn->render_sql("Select * from `podetailtable`  where  `POtemp`='0'", "id", "POtemp,itemid,Description,booktitle,author,price");
    //set default=-1
    //$conn->render_table("podetailtable","id","POtemp,itemid,booktitle,author,price"); //"table ","id" for table,"data column" for table
    $conn->sql->attach("DELETE", "DELETE * FROM `podetailtable` WHERE `itemid` = 0");
}
开发者ID:ray1992x,项目名称:Creditor_Module_v3,代码行数:22,代码来源:crs003s_Detail.php

示例7: formatting

mysql_select_db($mysql_db);
require "../../lib/codebase/grid_connector.php";
require "../../includes/functions.php";
//	function color_rows($row){
//		if ($row->get_index()%2)
//				$row->set_row_color("pink");
//	}
function formatting($row)
{
    $suratmasukviewlink = 106;
    //render field as details link
    $data = $row->get_value("NoSurat");
    // $row->set_value("TujuanSurat","<a href='details.php?id={$data}'><img src='image/ico_view.gif' alt='Lihat'> </a>");
    //$row->set_value("DicatatOleh","<a href='surat_masuk_cari_view.php?id={$data}'><img src='images/ico_view.gif' > </a>");
    $alamat = "index.php?p=" . enkripsi($suratmasukviewlink . "&q=" . $data);
    //$alamat = "<a href='index.php?p=".enkripsi($suratmasukviewlink ."&q=".$data)."><img src='images/ico_view.gif'></a>";
    // $row->set_value("DicatatOleh","<a href='index.php?p=\".enkripsi($suratmasukviewlink &q=\{$data})\"><img src=\"images/ico_view.gif\" ></a>");
    $row->set_value("DicatatOleh", "<a href='{$alamat}'><img src='images/ico_view.gif'></a>");
    $data = $row->get_value("TglTerima");
    $row->set_value("TglTerima", date("d-m-Y", strtotime($data)));
}
$grid = new GridConnector($res);
//	$grid->event->attach("beforeRender","color_rows");
$grid->event->attach("beforeRender", "formatting");
$grid->enable_log("temp.log", true);
$grid->dynamic_loading(100);
//$grid->render_table("country_data","country_id","name,full_name,type,capital");
//$grid->render_sql("Select * from dtrealisasi_fisik,tbsatker where dtrealisasi_fisik.KdSatker=tbsatker.KdSatker","Id","KdSatker,NmSatker,KdProgram,KdGiat,KdSGiat");
//	$grid->render_table("suratmasuk","IdSuratMasuk","TujuanSurat,NoSurat,AsalSurat,Perihal,TglTerima");
$grid->render_sql("SELECT * FROM suratmasuk WHERE DicatatOleh = '" . $KdSatker . "' order by TglTerima desc", "IdSuratMasuk", "DicatatOleh,NoSurat,AsalSurat,Perihal,TglTerima");
//$grid->render_sql("SELECT * FROM suratmasuk WHERE DicatatOleh = '". $KdSatker."'");
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:01_basic_connector.php

示例8: formatting

mysql_select_db($mysql_db);
require "../../lib/codebase/grid_connector.php";
require "../../includes/functions.php";
//	function color_rows($row){
//		if ($row->get_index()%2)
//				$row->set_row_color("pink");
//	}
function formatting($row)
{
    $suratkeluarviewlink = 78;
    //render field as details link
    $data = $row->get_value("IdSuratKeluar");
    // $row->set_value("TujuanSurat","<a href='details.php?id={$data}'><img src='image/ico_view.gif' alt='Lihat'> </a>");
    //  $row->set_value("DicatatOleh","<a href='surat_masuk_cari_view.php?id={$data}'><img src='images/ico_view.gif' > </a>");
    $alamat = "index.php?p=" . enkripsi($suratkeluarviewlink . "&q=" . $data);
    //$alamat = "<a href='index.php?p=".enkripsi($suratmasukviewlink ."&q=".$data)."><img src='images/ico_view.gif'></a>";
    // $row->set_value("DicatatOleh","<a href='index.php?p=\".enkripsi($suratmasukviewlink &q=\{$data})\"><img src=\"images/ico_view.gif\" ></a>");
    $row->set_value("DicatatOleh", "<a href='{$alamat}'><img src='images/ico_view.gif'></a>");
    $data = $row->get_value("WaktuBuat");
    $row->set_value("WaktuBuat", date("d-m-Y", strtotime($data)));
}
$grid = new GridConnector($res);
//	$grid->event->attach("beforeRender","color_rows");
$grid->event->attach("beforeRender", "formatting");
$grid->enable_log("temp.log", true);
$grid->dynamic_loading(100);
//$grid->render_table("country_data","country_id","name,full_name,type,capital");
//$grid->render_sql("Select * from dtrealisasi_fisik,tbsatker where dtrealisasi_fisik.KdSatker=tbsatker.KdSatker","Id","KdSatker,NmSatker,KdProgram,KdGiat,KdSGiat");
//	$grid->render_table("suratmasuk","IdSuratMasuk","TujuanSurat,NoSurat,AsalSurat,Perihal,TglTerima");
$grid->render_sql("SELECT * FROM suratkeluar WHERE DicatatOleh = '" . $KdSatker . "' order by WaktuBuat desc", "IdSuratKeluar", "DicatatOleh,NoSurat,TujuanSurat,Perihal,WaktuBuat");
//$grid->render_sql("SELECT * FROM suratmasuk WHERE DicatatOleh = '". $KdSatker."'");
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:01x_basic_connector.php

示例9: GridConnector

<?php

require_once "../dhtmlx/connector_codebase/grid_connector.php";
$res3 = mysql_connect("localhost", "root", "");
mysql_select_db("company");
session_start();
$CR_Code = strip_tags($_SESSION['PCR_Code']);
$conn3 = new GridConnector($res3, "MySQL");
$conn3->dynamic_loading(30);
// limited the loading data details
if ($CR_Code != null) {
    $conn3->render_sql("Select * from `paydetailtable`  where  `CRCode`='{$CR_Code}'", "id", "CRCode,No,date,period,invoice_no,po_number,invoice_amount,paid_period,payment_amount,remark");
} else {
    $conn3->render_sql("Select * from `paydetailtable`  where  `CRCode`='0'", "id", "CRCode,No,date,period,invoice_no,po_number,invoice_amount,paid_period,payment_amount,remark");
    //$conn2->render_table("ivdetailtable","id","InvNumber,itemid,Description,UOM,Quantity,UnitPrice,ItemPrice"); //"table ","id" for table,"data column" for table
}
?>


开发者ID:ray1992x,项目名称:Creditor_Module_v3,代码行数:17,代码来源:paydetailtable.php

示例10: GridConnector

<?php

require_once "../dhtmlx/connector_codebase/grid_connector.php";
$res1 = mysql_connect("localhost", "root", "");
mysql_select_db("company");
session_start();
$crno = strip_tags($_SESSION['CRNoteNo']);
$conn1 = new GridConnector($res1, "MySQL");
$conn1->dynamic_loading(30);
// limited the loading data details
if ($crno != null) {
    $conn1->render_sql("Select * from `cndetailtable`  where  `CNnumber`={$crno}", "id", "CNnumber,itemid,ReferenceNumber,Narrative,Amount");
} else {
    $conn1->render_sql("Select * from `cndetailtable`  where  `CNnumber`='0'", "id", "CNnumber,itemid,ReferenceNumber,Narrative,Amount");
    $conn->sql->attach("DELETE", "DELETE * FROM `cndetailtable` WHERE `itemid` = 0");
}
开发者ID:ray1992x,项目名称:Creditor_Module_v3,代码行数:16,代码来源:CNdetail.php

示例11: formatting

$KdSatker = @$_SESSION['xunit_' . $session_name];
require_once "../../lib/codebase/config.php";
$res = mysql_connect($mysql_server, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db);
require "../../lib/codebase/grid_connector.php";
require "../../includes/functions.php";
//	function color_rows($row){
//		if ($row->get_index()%2)
//				$row->set_row_color("pink");
//	}
function formatting($row)
{
    $suratmasukviewlink = 106;
    //render field as details link
    $data = $row->get_value("NoSurat");
    // $row->set_value("TujuanSurat","<a href='details.php?id={$data}'><img src='image/ico_view.gif' alt='Lihat'> </a>");
    $alamat = "index.php?p=" . enkripsi($suratmasukviewlink . "&q=" . $data);
    $row->set_value("IdPenerima", "<a href='{$alamat}'><img src='images/ico_view.gif' > </a>");
    $data = $row->get_value("TglTerima");
    $row->set_value("TglTerima", date("d-m-Y", strtotime($data)));
}
$grid = new GridConnector($res);
//	$grid->event->attach("beforeRender","color_rows");
$grid->event->attach("beforeRender", "formatting");
$grid->enable_log("temp.log", true);
$grid->dynamic_loading(100);
//$grid->render_table("country_data","country_id","name,full_name,type,capital");
//$grid->render_sql("Select * from dtrealisasi_fisik,tbsatker where dtrealisasi_fisik.KdSatker=tbsatker.KdSatker","Id","KdSatker,NmSatker,KdProgram,KdGiat,KdSGiat");
//	$grid->render_table("suratmasuk","IdSuratMasuk","TujuanSurat,NoSurat,AsalSurat,Perihal,TglTerima");
$grid->render_sql("SELECT * FROM vcariperorang WHERE IdPenerima = '" . $IdUser . "' order by TglDisposisi desc", "IdSuratMasuk", "IdPenerima,NoSurat,AsalSurat,Perihal,TglDisposisi");
开发者ID:abbeet,项目名称:server39,代码行数:30,代码来源:02_basic_connector.php


注:本文中的GridConnector::render_sql方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。