Jump to content
Sign in to follow this  
carinacosta

Datagrid PHP

Recommended Posts

carinacosta

Fiz um donwoald desta jquery.

Fiz o select e aparece-me os nomes dos campos nas colunas mas os dados desses campos não.

O código fonte que tenho é o seguinte:

<?php
error_reporting(E_ALL & ~E_NOTICE);
if ($_GET['p']) phpinfo();
// set up DB
$conn = pg_connect("host=192.1.1.154 dbname=cpis2012 user=CARINA password=4141");
//pg_select_db("cpis2012");

// set your db encoding -- for ascent chars (if required)
pg_query("SET NAMES 'utf8'");

// include and create object
include("inc/jqgrid_dist.php");
$g = new jqgrid();

// set few params
$grid["caption"] = "Ordens de Fabrico";
$g->set_options($grid);

// set database table for CRUD operations
//$g->table = "ordensfabrico";

// subqueries are also supported now (v1.2)
$g->select_command = "select id, numordfab, datordfab, ficof, especificacao from ordensfabrico";
// render grid
$out = $g->render("list1");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="js/themes/redmond/jquery-ui.custom.css"></link>
<link rel="stylesheet" type="text/css" media="screen" href="js/jqgrid/css/ui.jqgrid.css"></link>

<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
</head>
<body>
<div style="margin:10px" >
<?php echo $out?>
</div>
</body>
</html>

será que me poderiam ajudar? Obrigada

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.