|
<?php include('/big/dom/xphplens/www/php/phplens/phplens.inc.php'); session_start(); //---------------------------------------- // The following lines are for formatting // the page and not needed by phplens $gTitle = "Simple Category Table Demo"; include('./header.php'); //---------------------------------------------------- // setup lens and render it with persistent connection $lens = PHPLensPConnect ( 'ex101', // id to uniquely identify this phplens setup "select * from categories", 'mysql', // database server type, eg. pgsql, odbc, mssql, oci8 $gEX_server, // eg. localhost or ODBC DSN $gEX_userid, $gEX_password, $gEX_db); // optional, name of database to connect to if ($lens) { $lens->gridLens = "CategoryName;Description"; //--------------------------------------------------------- // the following lines are for the security of this website //$lens->dynEdit = 0; // disable designer editing $lens->Render(); $lens->Close(); } ?> <h4>Notes</h4> <p>Now we hide the CategoryID and Picture columns by using the <i>gridLens</i> property. Only columns we want to display are listed here.</p> <pre>$lens->gridLens = "CategoryName;Description";</pre> <p>You can also hide the columns dynamicly by clicking on the [pict here] button and selecting the columns you want to see in the grid [picture here]</p> <p>For best performance, instead of hiding columns, only retrieve the columns you need. In SQL, use:<br> <code>SELECT categoryname, description FROM categories</code><p>
<?php include ('./footer.php'); ?>
|
|