I already use jsGrid + SQLServer but with normal SELECT query.
I want to fill jqGrid (PHP) from a stored procedure with parameters in SQLServer…but not work
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
require_once 'jqSuite/php/jqGrid.php'; require_once 'jqSuite/php/jqGridSqlsrv.php'; $connectionInfo = array("UID" => DB_USER, "PWD" => DB_PASSWORD,"Database"=>DB_NAME, "ReturnDatesAsStrings" => true); $conn = sqlsrv_connect( DB_HOST, $connectionInfo); if( $conn ){ // echo "Connection established.\n"; }else{ // echo "Connection could not be established.\n"; die( print_r( sqlsrv_errors(), true)); } $COL1 = jqGridUtils::GetParam("COL1"); $COL2 = jqGridUtils::GetParam("COL2"); $grid = new jqGridRender($conn); $grid->SelectCommand ='EXEC procNomFields @COD1=? AND @COD2=?'; $grid->setColModel(null, array(&$COL1,&$COL2)); ... $grid->renderGrid("#detail","#pgdetail", true, $summaryrows, array(&$COL1,&$COL2), true,true); $conn = null; |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top