本文整理汇总了PHP中DbUtils::getLayerIdFromLayerName方法的典型用法代码示例。如果您正苦于以下问题:PHP DbUtils::getLayerIdFromLayerName方法的具体用法?PHP DbUtils::getLayerIdFromLayerName怎么用?PHP DbUtils::getLayerIdFromLayerName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DbUtils
的用法示例。
在下文中一共展示了DbUtils::getLayerIdFromLayerName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
* This is the main page of the sld-editor.
* It displays the preview images and creates the sld_edit_form
* used for editing the sld.
*
* @package sld_main
* @author Markus Krzyzanowski
*/
require_once dirname(__FILE__) . "/sld_config.php";
require_once dirname(__FILE__) . "/../classes/class_wfs_conf.php";
$classWfsConf = new wfs_conf();
//read custom sld for this user&wms&layer&gui from the db instead using sld.xml
$con = db_connect($DBSERVER, $OWNER, $PW);
db_select_db($DB, $con);
//Read the layer_id from the DB
$dbutils = new DbUtils();
$layer_id = $dbutils->getLayerIdFromLayerName($_SESSION["sld_wms_id"], $_SESSION["sld_layer_name"]);
if ($layer_id) {
$_SESSION["sld_layer_id"] = $layer_id;
}
//Read the mb_user_id from the Session
$mb_user_id = $_SESSION["mb_user_id"];
//if layer is not found in DB
if (!$layer_id) {
echo "layer existiert nicht in Datenbank";
exit;
} else {
//Try to read sld from the DB
$sql = "SELECT * FROM sld_user_layer WHERE fkey_gui_id = \$1 AND fkey_layer_id = \$2 AND fkey_mb_user_id = \$3";
$v = array($_SESSION["sld_gui_id"], $layer_id, $mb_user_id);
$t = array('s', 'i', 'i');
$res = db_prep_query($sql, $v, $t);