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


PHP connDB函数代码示例

本文整理汇总了PHP中connDB函数的典型用法代码示例。如果您正苦于以下问题:PHP connDB函数的具体用法?PHP connDB怎么用?PHP connDB使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: update

function update($post_category_name, $post_category_description, $post_category_level, $post_category_order, $post_active, $post_visibility, $post_lang_code, $post_id_param)
{
    $conn = connDB();
    $sql = "UPDATE tbl_category_lang set `category_name` = '{$post_category_name}', \n                                          `category_description` = '{$post_category_description}', \n\t\t\t\t\t\t\t\t\t\t  `category_level` = '{$post_category_level}', \n\t\t\t\t\t\t\t\t\t\t  `category_order` = '{$post_category_order}', \n\t\t\t\t\t\t\t\t\t\t  `active` = '{$post_active}', \n\t\t\t\t\t\t\t\t\t\t  `visibility` = '{$post_visibility}', \n\t\t\t\t\t\t\t\t\t\t  `language_code` = '{$post_lang_code}'\n\t\t     WHERE `id_param` = '{$post_id_param}'\n\t\t\t";
    $query = mysql_query($sql, $conn) or die(mysql_error());
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:7,代码来源:detail.php

示例2: listCategoryColor

function listCategoryColor($level, $parent, $current_category, $data)
{
    $conn = connDB();
    $get_data = mysql_query("SELECT * from tbl_tag AS cat INNER JOIN tbl_tag_relation AS cat_rel ON cat.category_id = cat_rel.category_child\n\t                        WHERE cat.category_level = '{$level}' AND cat_rel.category_parent = '{$parent}' ORDER BY category_order", $conn);
    if (mysql_num_rows($get_data) != null && mysql_num_rows($get_data) != 0) {
        for ($counter = 1; $counter <= mysql_num_rows($get_data); $counter++) {
            $get_data_array = mysql_fetch_array($get_data);
            $new_level = $level * 1 + 1;
            $new_parent = $get_data_array["category_id"];
            $check = get_colored($get_data_array['category_id'], $data);
            echo '<div class="col-xs-9 ';
            if ($level !== 1) {
                echo 'hidden';
            }
            echo ' ">';
            echo '<input type="checkbox" ';
            if ($check['rows'] > 0) {
                echo 'checked="checked" ';
            }
            echo 'class="form-control' . $level . '" data-level="' . $level . '" id="option_level_' . $level . '"value="' . $new_parent . '" style="margin-bottom:10px;" name="tag_id[]">';
            echo '&nbsp;';
            for ($i = 0; $i < $level; $i++) {
                echo '-- ';
            }
            echo $get_data_array["category_name"];
            echo '</div>';
            listCategoryColor($new_level, $new_parent, $current_category, $data);
        }
    }
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:30,代码来源:ajax_color.php

示例3: update_sizefit

function update_sizefit()
{
    $conn = connDB();
    $product_category = $_POST["product_category"];
    $product_size_type_id = $_POST["size_type_id"];
    $product_name = $_POST["product_name"];
    $type_name = $_POST["type_name"];
    //array
    $type_sizefit = $_POST["type_sizefit"];
    //array
    $product_id = $_POST["product_id"];
    if ($product_id == '') {
        //get the new product id
        $get_id = mysql_query("\n\t\t\t\t SELECT * from tbl_product\n\t\t\t\t WHERE product_category = '{$product_category}' AND product_name = '{$product_name}' AND product_size_type_id = '{$product_size_type_id}'\n\t\t\t\t ORDER BY id DESC\n\t\t\t\t ", $conn);
        if (mysql_num_rows($get_id) != null) {
            $get_id_array = mysql_fetch_array($get_id);
            $product_id = $get_id_array["id"];
        }
    }
    //!product types
    for ($i = 1; $type_name[$i] != null; $i++) {
        echo $sql = "\n\t\t\t\t   UPDATE tbl_product_type\n\t\t\t\t   SET type_sizefit = '{$type_sizefit[$i]}'\n\t\t\t\t   WHERE type_name = '{$type_name[$i]}' AND product_id='{$product_id}'\n\t\t\t\t   ";
        mysql_query($sql, $conn);
    }
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:25,代码来源:control.php

示例4: get_product_id_how

function get_product_id_how($post_product_alias)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_product WHERE `product_alias` = '{$post_product_alias}'";
    $query = mysql_query($sql, $conn) or die(mysql_error());
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:8,代码来源:how_control.php

示例5: get_order_gallery

function get_order_gallery()
{
    $conn = connDB();
    $sql = "SELECT * FROM `tbl_gallery` ORDER BY `order` DESC LIMIT 1";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:huntstreet-v3,代码行数:8,代码来源:get.php

示例6: get_filtered

function get_filtered($post_product_id, $post_filter_id)
{
    $conn = connDB();
    $sql = "SELECT COUNT(*) AS rows FROM tbl_filter_item WHERE `filter_param` = '{$post_filter_id}' AND `product_param` = '{$post_product_id}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:8,代码来源:ajax_filter.php

示例7: get_how

function get_how($post_product_id)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_product_custom WHERE `product_id` = '{$post_product_id}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:8,代码来源:ajax_how.php

示例8: breadcrumbs_get_user_name

function breadcrumbs_get_user_name($post_user_alias)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_user WHERE `user_alias` = '{$post_user_alias}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:8,代码来源:breadcrumbs.php

示例9: delete_inspiration

function delete_inspiration($post_ins_id)
{
    $conn = connDB();
    $sql = "DELETE FROM tbl_inspiration_image WHERE `inspiration_image_id` = '{$post_ins_id}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:huntstreet-v3,代码行数:8,代码来源:delete.php

示例10: get_default

function get_default($post_category_id)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_news_category WHERE `category_id` = '{$post_category_id}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:8,代码来源:ajax.php

示例11: count_filter

function count_filter($post_filter_name)
{
    $conn = connDB();
    $sql = "SELECT COUNT(*) AS rows FROM tbl_filter_sub WHERE `filter_name` = '{$post_filter_name}' ";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:8,代码来源:get.php

示例12: get_product_id_how

function get_product_id_how()
{
    $conn = connDB();
    $sql = "SELECT MAX(id) as product_id FROM tbl_product";
    $query = mysql_query($sql, $conn) or die(mysql_error());
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:8,代码来源:how_control.php

示例13: getRecipe

function getRecipe($post_recipe_name, $post_recipe_id)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_recipes WHERE `recipe_name` = '{$post_recipe_name}' AND `recipe_id` = '{$post_recipe_id}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:8,代码来源:get.php

示例14: custom_get_files

function custom_get_files($post_product_id)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_product_files WHERE `product_id` = '{$post_product_id}'";
    $query = mysql_query($sql, $conn) or die(mysql_error());
    $result = mysql_fetch_array($query);
    return $result;
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:8,代码来源:files_control.php

示例15: insert_wishlist

function insert_wishlist($ajx_user,$date,$ajx_type,$ajx_stock,$ajx_qty){
   $conn   = connDB();
   
   $sql    = "INSERT INTO tbl_wishlist(user_id,wishlist_date,type_id,stock_name,item_quantity)
			  VALUES ('$ajx_user','$date','$ajx_type','$ajx_stock','$ajx_qty')";
   $query  = mysql_query($sql, $conn);
   
}
开发者ID:nickyudha,项目名称:huntstreet-v3,代码行数:8,代码来源:add_wishlist.php


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