예제 #1
0
 function get_seo($product_alias, $type_alias)
 {
     $conn = conndB();
     $sql = "SELECT * FROM tbl_product AS prod_ LEFT JOIN tbl_product_type AS type_ ON prod_.id = type_.product_id\n\t             WHERE `product_visibility` = '1'\n\t\t\t\t AND `type_visibility` = '1'\n\t\t\t\t AND `product_alias` = '{$product_alias}'\n\t\t\t\t AND `type_alias` = '{$type_alias}'\n\t\t\t\t";
     $query = mysql_query($sql, $conn);
     $result = mysql_fetch_array($query);
     return $result;
 }
예제 #2
0
function count_category($post_category_id)
{
    $conn = conndB();
    $sql = "SELECT * FROM tbl_tags WHERE `category_id` = '{$post_category_id}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
예제 #3
0
function count_category_lang_child($post_news_category)
{
    $conn = conndB();
    $sql = "SELECT COUNT(*) AS rows FROM tbl_news_lang WHERE `news_category` = '{$post_news_category}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
예제 #4
0
function get_inspiration_featured($post_inspiration_id)
{
    $conn = conndB();
    $sql = "SELECT * FROM tbl_inspiraton_featured WHERE `param_inspiration_id` = '{$post_inspiration_id}'";
    $query = mysql_query($sql, $conn);
    $row = array();
    while ($result = mysql_fetch_array($query)) {
        array_push($row, $result);
    }
    return $row;
}
예제 #5
0
function get_job($src_param, $post_order_by, $start_record, $query_per_page, $cat)
{
    $conn = conndB();
    $sql = "SELECT * FROM tbl_career AS job INNER JOIN tbl_career_category AS dept ON job.category = dept.category_id\n              WHERE {$src_param} {$cat}\n\t\t\t  ORDER BY {$post_order_by}\n\t\t\t  LIMIT {$start_record}, {$query_per_page}\n\t\t\t ";
    $query = mysql_query($sql, $conn);
    $row = array();
    while ($result = mysql_fetch_array($query)) {
        array_push($row, $result);
    }
    return $row;
}
예제 #6
0
function get_job($src_param, $post_order_by, $start_record, $query_per_page, $cat)
{
    $conn = conndB();
    $sql = "SELECT * FROM tbl_filter WHERE {$src_param} ORDER BY {$post_order_by} LIMIT {$start_record}, {$query_per_page}";
    $query = mysql_query($sql, $conn);
    $row = array();
    while ($result = mysql_fetch_array($query)) {
        array_push($row, $result);
    }
    return $row;
}
예제 #7
0
function insert($post_name, $post_desc, $post_visibility, $post_order)
{
    $conn = conndB();
    $sql = "INSERT INTO tbl_inspiration_category (`name`, `description`, `visibility`, `category_order`)\n                                             VALUES('{$post_name}', '{$post_desc}', '{$post_visibility}', '{$post_order}')\n\t\t\t ";
    $query = mysql_query($sql, $conn) or die(mysql_error());
}
예제 #8
0
function update($post_category_name, $post_description, $post_category_visibility, $post_category_id)
{
    $conn = conndB();
    $sql = "UPDATE tbl_inspiration_category SET `name` = '{$post_category_name}',\n                                                  `description` = '{$post_description}',\n\t\t\t\t\t\t\t\t\t              `visibility` = '{$post_category_visibility}'\n\t\t\t  WHERE `category_id` = '{$post_category_id}'";
    $query = mysql_query($sql, $conn) or die(mysql_error());
}