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


PHP memcache_mysql_fetch_assoc函数代码示例

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


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

示例1: memcache_mysql_fetch_assoc

 $site_url_row = memcache_mysql_fetch_assoc($site_url_sql);
 $html['referer'] = htmlentities($site_url_row['site_url_address'], ENT_QUOTES, 'UTF-8');
 $html['referer_host'] = htmlentities($site_url_row['site_domain_host'], ENT_QUOTES, 'UTF-8');
 $mysql['click_landing_site_url_id'] = mysql_real_escape_string($click_row['click_landing_site_url_id']);
 $site_url_sql = "SELECT * FROM 202_site_urls LEFT JOIN 202_site_domains USING (site_domain_id) \n\t\t\t\t\t\t WHERE  202_site_urls.site_url_id = '" . $mysql['click_landing_site_url_id'] . "'\n\t\t\t\t\t\t AND    202_site_urls.site_domain_id = 202_site_domains.site_domain_id";
 $site_url_row = memcache_mysql_fetch_assoc($site_url_sql);
 $html['landing'] = htmlentities($site_url_row['site_url_address'], ENT_QUOTES, 'UTF-8');
 $html['landing_host'] = htmlentities($site_url_row['site_domain_host'], ENT_QUOTES, 'UTF-8');
 $mysql['click_outbound_site_url_id'] = mysql_real_escape_string($click_row['click_outbound_site_url_id']);
 $site_url_sql = "SELECT * FROM 202_site_urls LEFT JOIN 202_site_domains USING (site_domain_id) \n\t\t\t\t\t\t WHERE  202_site_urls.site_url_id = '" . $mysql['click_outbound_site_url_id'] . "'\n\t\t\t\t\t\t AND    202_site_urls.site_domain_id = 202_site_domains.site_domain_id";
 $site_url_row = memcache_mysql_fetch_assoc($site_url_sql);
 $html['outbound'] = htmlentities($site_url_row['site_url_address'], ENT_QUOTES, 'UTF-8');
 $html['outbound_host'] = htmlentities($site_url_row['site_domain_host'], ENT_QUOTES, 'UTF-8');
 $mysql['click_cloaking_site_url_id'] = mysql_real_escape_string($click_row['click_cloaking_site_url_id']);
 $site_url_sql = "SELECT * FROM 202_site_urls LEFT JOIN 202_site_domains USING (site_domain_id) \n\t\t\t\t\t\t WHERE  202_site_urls.site_url_id = '" . $mysql['click_cloaking_site_url_id'] . "'\n\t\t\t\t\t\t AND    202_site_urls.site_domain_id = 202_site_domains.site_domain_id";
 $site_url_row = memcache_mysql_fetch_assoc($site_url_sql);
 $html['cloaking'] = htmlentities($site_url_row['site_url_address'], ENT_QUOTES, 'UTF-8');
 $html['cloaking_host'] = htmlentities($site_url_row['site_domain_host'], ENT_QUOTES, 'UTF-8');
 $mysql['click_redirect_site_url_id'] = mysql_real_escape_string($click_row['click_redirect_site_url_id']);
 $site_url_sql = "SELECT * FROM 202_site_urls LEFT JOIN 202_site_domains USING (site_domain_id) \n\t\t\t\t\t\t WHERE  202_site_urls.site_url_id = '" . $mysql['click_redirect_site_url_id'] . "'\n\t\t\t\t\t\t AND    202_site_urls.site_domain_id = 202_site_domains.site_domain_id";
 $site_url_result = mysql_query($site_url_sql) or record_mysql_error($site_url_sql);
 $site_url_row = mysql_fetch_assoc($site_url_result);
 $html['redirect'] = htmlentities($site_url_row['site_url_address'], ENT_QUOTES, 'UTF-8');
 $html['redirect_host'] = htmlentities($site_url_row['site_domain_host'], ENT_QUOTES, 'UTF-8');
 $html['aff_campaign_id'] = htmlentities($click_row['aff_campaign_id'], ENT_QUOTES, 'UTF-8');
 $html['landing_page_nickname'] = htmlentities($click_row['landing_page_nickname'], ENT_QUOTES, 'UTF-8');
 $html['ppc_account_id'] = htmlentities($click_row['ppc_account_id'], ENT_QUOTES, 'UTF-8');
 $html['text_ad_id'] = htmlentities($click_row['text_ad_id'], ENT_QUOTES, 'UTF-8');
 $html['text_ad_name'] = htmlentities($click_row['text_ad_name'], ENT_QUOTES, 'UTF-8');
 $html['aff_campaign_name'] = htmlentities($click_row['aff_campaign_name'], ENT_QUOTES, 'UTF-8');
 $html['aff_network_name'] = htmlentities($click_row['aff_network_name'], ENT_QUOTES, 'UTF-8');
开发者ID:samuelpj,项目名称:prosper202,代码行数:31,代码来源:index.php

示例2: mysql_real_escape_string

<?php

include_once $_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php';
//get the aff_camapaign_id
$mysql['aff_campaign_id_public'] = mysql_real_escape_string($_GET['acip']);
$aff_campaign_sql = "SELECT user_id FROM 202_aff_campaigns WHERE aff_campaign_id_public='" . $mysql['aff_campaign_id_public'] . "'";
$aff_campaign_row = memcache_mysql_fetch_assoc($aff_campaign_sql);
$mysql['user_id'] = mysql_real_escape_string($aff_campaign_row['user_id']);
//see if it has the cookie, do whatever we can to grab to grab SOMETHING to tie this lead to
if ($_COOKIE['tracking202subid']) {
    $mysql['click_id'] = mysql_real_escape_string($_COOKIE['tracking202subid']);
} else {
    //ok grab the last click from this ip_id
    $mysql['ip_address'] = mysql_real_escape_string($_SERVER['REMOTE_ADDR']);
    $daysago = time() - 2592000;
    // 30 days ago
    $click_sql1 = "\tSELECT \t202_clicks.click_id \n\t\t\t\t\tFROM \t\t202_clicks\n\t\t\t\t\tLEFT JOIN\t202_clicks_advance USING (click_id)\n\t\t\t\t\tLEFT JOIN \t202_ips USING (ip_id) \n\t\t\t\t\tWHERE \t202_ips.ip_address='" . $mysql['ip_address'] . "'\n\t\t\t\t\tAND\t\t202_clicks.user_id='" . $mysql['user_id'] . "'  \n\t\t\t\t\tAND\t\t202_clicks.click_time >= '" . $daysago . "'\n\t\t\t\t\tORDER BY \t202_clicks.click_id DESC \n\t\t\t\t\tLIMIT \t\t1";
    $click_result1 = mysql_query($click_sql1) or record_mysql_error($click_sql1);
    $click_row1 = mysql_fetch_assoc($click_result1);
    $mysql['click_id'] = mysql_real_escape_string($click_row1['click_id']);
}
if ($mysql['click_id']) {
    //ok now update and fire the pixel tracking
    $click_sql = "UPDATE 202_clicks SET click_lead='1', click_filtered='0'  WHERE click_id='" . $mysql['click_id'] . "' ";
    delay_sql($click_sql);
    $click_sql = "UPDATE 202_clicks_spy SET click_lead='1', click_filtered='0' WHERE click_id='" . $mysql['click_id'] . "' ";
    delay_sql($click_sql);
}
开发者ID:samuelpj,项目名称:prosper202,代码行数:28,代码来源:px.php

示例3: base64_decode

<?php

include_once $_SERVER['DOCUMENT_ROOT'] . '/202-config/connect2.php';
//run script
$mysql['landing_page_id_public'] = $db->real_escape_string($_GET['lpip']);
if (isset($_GET['202vars'])) {
    $mysql['202vars'] = base64_decode($db->real_escape_string($_GET['202vars']));
}
$tracker_sql = "SELECT  aff_campaign_name,\n\t\t\t\t\t\t  aff_campaign_rotate,\n\t\t\t\t\t\t  aff_campaign_url,\n\t\t\t\t\t\t  aff_campaign_url_2,\n\t\t\t\t\t\t  aff_campaign_url_3,\n\t\t\t\t\t\t  aff_campaign_url_4,\n\t\t\t\t\t\t  aff_campaign_url_5\n\t\t\t\tFROM    202_landing_pages LEFT JOIN 202_aff_campaigns USING (aff_campaign_id)\n\t\t\t\tWHERE   landing_page_id_public='" . $mysql['landing_page_id_public'] . "'";
$tracker_row = memcache_mysql_fetch_assoc($db, $tracker_sql);
if (!$tracker_row) {
    die;
}
//DONT ESCAPE THE DESITNATIONL URL IT TOTALLY SCREWS UP
$html['aff_campaign_name'] = htmlentities($tracker_row['aff_campaign_name'], ENT_QUOTES, 'UTF-8');
//modify the redirect site url to go through another cloaked link
$redirect_site_url = rotateTrackerUrl($db, $tracker_row);
// get the click id
$click_id = $_COOKIE['tracking202subid'];
$redirect_site_url = replaceTrackerPlaceholders($db, $redirect_site_url, $click_id);
if (isset($mysql['202vars'])) {
    $redirect_site_url = setPrePopVars($mysql['202vars'], $redirect_site_url, false);
}
?>

<html>
	<head>
		<title><?php 
echo $html['aff_campaign_name'];
?>
</title>
开发者ID:viasmonster,项目名称:prosper202,代码行数:31,代码来源:lpc.php

示例4: USING

//grab tracker data
$mysql['tracker_id_public'] = $db->real_escape_string($t202id);
$tracker_sql = "SELECT 202_trackers.user_id,\n\t\t\t\t\t\t202_trackers.aff_campaign_id,\n\t\t\t\t\t\ttext_ad_id,\n\t\t\t\t\t\tppc_account_id,\n\t\t\t\t\t\tclick_cpc,\n\t\t\t\t\t\tclick_cloaking,\n\t\t\t\t\t\taff_campaign_rotate,\n\t\t\t\t\t\taff_campaign_url,\n\t\t\t\t\t\taff_campaign_url_2,\n\t\t\t\t\t\taff_campaign_url_3,\n\t\t\t\t\t\taff_campaign_url_4,\n\t\t\t\t\t\taff_campaign_url_5,\n\t\t\t\t\t\taff_campaign_payout,\n\t\t\t\t\t\taff_campaign_cloaking\n\t\t\t\tFROM    202_trackers \n\t\t\t\tLEFT JOIN 202_aff_campaigns USING (aff_campaign_id) \n\t\t\t\tWHERE   tracker_id_public='" . $mysql['tracker_id_public'] . "'";
$tracker_row = memcache_mysql_fetch_assoc($db, $tracker_sql);
if ($memcacheWorking) {
    $url = $tracker_row['aff_campaign_url'];
    $tid = $t202id;
    $getKey = $memcache->get(md5('url_' . $tid . systemHash()));
    if ($getKey === false) {
        $setUrl = $memcache->set(md5('url_' . $tid . systemHash()), $url, false, 0);
    }
}
//set the timezone to the users timezone
$mysql['user_id'] = $db->real_escape_string($tracker_row['user_id']);
$user_sql = "\n\tSELECT\n\t\tuser_timezone, \n\t\tuser_keyword_searched_or_bidded,\n\t\tmaxmind_isp \n\tFROM\n\t\t202_users\n\t\tLEFT JOIN 202_users_pref USING (user_id)\n\tWHERE\n\t\t202_users.user_id='" . $mysql['user_id'] . "'\n";
$user_row = memcache_mysql_fetch_assoc($db, $user_sql);
//now this sets it
AUTH::set_timezone($user_row['user_timezone']);
if (!$tracker_row) {
    die;
}
//get mysql variables
$mysql['aff_campaign_id'] = $db->real_escape_string($tracker_row['aff_campaign_id']);
$mysql['ppc_account_id'] = $db->real_escape_string($tracker_row['ppc_account_id']);
$mysql['click_cpc'] = $db->real_escape_string($tracker_row['click_cpc']);
$mysql['click_payout'] = $db->real_escape_string($tracker_row['aff_campaign_payout']);
$mysql['click_time'] = time();
$mysql['text_ad_id'] = $db->real_escape_string($tracker_row['text_ad_id']);
/* ok, if $_GET['OVRAW'] that is a yahoo keyword, if on the REFER, there is a $_GET['q], that is a GOOGLE keyword... */
//so this is going to check the REFERER URL, for a ?q=, which is the ACUTAL KEYWORD searched.
$referer_url_parsed = @parse_url($_SERVER['HTTP_REFERER']);
开发者ID:viasmonster,项目名称:prosper202,代码行数:31,代码来源:dl.php

示例5: systemHash

if ($usedCachedRedirect == true) {
    //if a cached key is found for this id, redirect to that url
    if ($memcacheWorking) {
        $getUrl = $memcache->get(md5("default_url" . $tracker_id . systemHash()));
        if ($getUrl) {
            header('location: ' . $getUrl);
            die;
        }
    }
    die("<h2>Error establishing a database connection - please contact the webhost</h2>");
}
include_once $_SERVER['DOCUMENT_ROOT'] . '/202-config/connect2.php';
//grab tracker data
$mysql['tracker_id_public'] = $db->real_escape_string($tracker_id);
$rotator_sql = "SELECT  tr.user_id,\n\t\t\t\t\t\ttr.ppc_account_id,\n\t\t\t\t\t\ttr.rotator_id,\n\t\t\t\t\t\ttr.click_cpc,\n\t\t\t\t\t\trt.default_url,\n\t\t\t\t\t\trt.default_campaign,\n\t\t\t\t\t\tca.aff_campaign_id,\n\t\t\t\t\t\tca.aff_campaign_rotate,\n\t\t\t\t\t    ca.aff_campaign_url,\n\t\t\t\t\t    ca.aff_campaign_url_2,\n\t\t\t\t\t    ca.aff_campaign_url_3,\n\t\t\t\t\t    ca.aff_campaign_url_4,\n\t\t\t\t\t    ca.aff_campaign_url_5,\n\t\t\t\t\t    ca.aff_campaign_payout,\n\t\t\t\t\t    ca.aff_campaign_cloaking,\n\t\t\t\t\t\tur.user_timezone,\n\t\t\t\t\t   \tup.user_keyword_searched_or_bidded,\n\t\t\t\t\t   \tup.maxmind_isp\n\t\t\t\tFROM    202_trackers AS tr\n\t\t\t\tLEFT JOIN 202_rotators AS rt ON rt.id = tr.rotator_id\n\t\t\t\tLEFT JOIN 202_aff_campaigns AS ca ON ca.aff_campaign_id = rt.default_campaign\n\t\t\t\tLEFT JOIN 202_users AS ur ON ur.user_id = tr.user_id\n\t\t\t\tLEFT JOIN 202_users_pref AS up ON up.user_id = tr.user_id\n\t\t\t\tWHERE   tracker_id_public='" . $mysql['tracker_id_public'] . "'";
$rotator_row = memcache_mysql_fetch_assoc($db, $rotator_sql);
$user_id = $db->real_escape_string($rotator_row['user_id']);
$user_keyword_searched_or_bidded = $db->real_escape_string($rotator_row['user_keyword_searched_or_bidded']);
//grab rules data
$mysql['rotator_id'] = $db->real_escape_string($rotator_row['rotator_id']);
$rule_sql = "SELECT ru.id as rule_id,\n\t\t\t\t\t   ru.redirect_url,\n\t\t\t\t\t   ru.redirect_campaign,\n\t\t\t\t\t   ca.aff_campaign_id,\n\t\t\t\t\t   ca.aff_campaign_rotate,\n\t\t\t\t\t   ca.aff_campaign_url,\n\t\t\t\t\t   ca.aff_campaign_url_2,\n\t\t\t\t\t   ca.aff_campaign_url_3,\n\t\t\t\t\t   ca.aff_campaign_url_4,\n\t\t\t\t\t   ca.aff_campaign_url_5,\n\t\t\t\t\t   ca.aff_campaign_payout,\n\t\t\t\t\t   ca.aff_campaign_cloaking\n\t\t\t\tFROM 202_rotator_rules AS ru\n\t\t\t\tLEFT JOIN 202_aff_campaigns AS ca ON ca.aff_campaign_id = ru.redirect_campaign\n\t\t\t\tWHERE rotator_id='" . $mysql['rotator_id'] . "' AND status='1'";
$rule_row = foreach_memcache_mysql_fetch_assoc($db, $rule_sql);
if (!$rotator_row) {
    die;
}
AUTH::set_timezone($rotator_row['user_timezone']);
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
if ($rotator_row['maxmind'] == '1') {
    $IspData = getIspData($ip_address);
} else {
    $IspData = null;
开发者ID:viasmonster,项目名称:prosper202,代码行数:31,代码来源:rtr.php

示例6: memcache_mysql_fetch_assoc

$tracker_sql = "SELECT 202_landing_pages.user_id,\n\t\t\t\t\t\t202_landing_pages.landing_page_id,\n\t\t\t\t\t\t202_landing_pages.aff_campaign_id,\n\t\t\t\t\t\t202_aff_campaigns.aff_campaign_url,\n\t\t\t\t\t\t202_aff_campaigns.aff_campaign_url_2,\n\t\t\t\t\t\t202_aff_campaigns.aff_campaign_url_3,\n\t\t\t\t\t\t202_aff_campaigns.aff_campaign_url_4,\n\t\t\t\t\t\t202_aff_campaigns.aff_campaign_url_5,\n\t\t\t\t\t\t202_aff_campaigns.aff_campaign_payout,\n\t\t\t\t\t\t202_aff_campaigns.aff_campaign_cloaking,\n\t\t\t\t\t\t202_aff_campaigns.aff_campaign_rotate\n\t\t\t\tFROM    202_landing_pages, 202_aff_campaigns\n\t\t\t\tWHERE   202_landing_pages.landing_page_id_public='" . $mysql['landing_page_id_public'] . "'\n\t\t\t\tAND     202_aff_campaigns.aff_campaign_id = 202_landing_pages.aff_campaign_id";
$tracker_row = memcache_mysql_fetch_assoc($tracker_sql);
//set the timezone to the users timezone
$mysql['user_id'] = mysql_real_escape_string($tracker_row['user_id']);
$user_sql = "SELECT \t\tuser_timezone, \n\t\t\t\t\t\t\tuser_keyword_searched_or_bidded \n\t\t\t   FROM \t\t202_users \n\t\t\t   LEFT JOIN\t202_users_pref USING (user_id)\n\t\t\t   WHERE \t\t202_users.user_id='" . $mysql['user_id'] . "'";
$user_row = memcache_mysql_fetch_assoc($user_sql);
//now this sets it
AUTH::set_timezone($user_row['user_timezone']);
if (!$tracker_row) {
    die;
}
if ($_GET['t202id']) {
    //grab tracker data if avaliable
    $mysql['tracker_id_public'] = mysql_real_escape_string($_GET['t202id']);
    $tracker_sql2 = "SELECT  text_ad_id,\n\t\t\t\t\t\t\tppc_account_id,\n\t\t\t\t\t\t\tclick_cpc,\n\t\t\t\t\t\t\tclick_cloaking\n\t\t\t\t\tFROM    202_trackers\n\t\t\t\t\tWHERE   tracker_id_public='" . $mysql['tracker_id_public'] . "'";
    $tracker_row2 = memcache_mysql_fetch_assoc($tracker_sql2);
    if ($tracker_row2) {
        $tracker_row = array_merge($tracker_row, $tracker_row2);
    }
}
//INSERT THIS CLICK BELOW, if this click doesn't already exisit
//get mysql variables
$mysql['user_id'] = mysql_real_escape_string($tracker_row['user_id']);
$mysql['aff_campaign_id'] = mysql_real_escape_string($tracker_row['aff_campaign_id']);
$mysql['ppc_account_id'] = mysql_real_escape_string($tracker_row['ppc_account_id']);
$mysql['click_cpc'] = mysql_real_escape_string($tracker_row['click_cpc']);
$mysql['click_payout'] = mysql_real_escape_string($tracker_row['aff_campaign_payout']);
$mysql['click_time'] = time();
$mysql['landing_page_id'] = mysql_real_escape_string($tracker_row['landing_page_id']);
$mysql['text_ad_id'] = mysql_real_escape_string($tracker_row['text_ad_id']);
/* ok, if $_GET['OVRAW'] that is a yahoo keyword, if on the REFER, there is a $_GET['q], that is a GOOGLE keyword... */
开发者ID:ClickBooth,项目名称:XTracks,代码行数:31,代码来源:record_simple.php

示例7: get_location_id

 function get_location_id($ip_address)
 {
     if (geoLocationDatabaseInstalled() == true) {
         $clean['ip_address'] = ip2long($ip_address);
         $mysql['ip_address'] = mysql_real_escape_string($clean['ip_address']);
         $location_sql = "SELECT location_id FROM 202_locations_block WHERE location_block_ip_from >= '" . $mysql['ip_address'] . "' AND location_block_ip_to <= '" . $mysql['ip_address'] . "'";
         $location_row = memcache_mysql_fetch_assoc($location_sql);
         $location_id = $location_row['location_id'];
         return $location_id;
     } else {
         return 0;
     }
 }
开发者ID:ClickBooth,项目名称:XTracks,代码行数:13,代码来源:functions-tracking202.php

示例8: sure

            echo "ISP Database file doesn't exist. Make sure (GeoIPISP.dat file) is in /202-config/geo/ folder.";
        }
    }
    if ($_POST['maxmind'] == "false") {
        $mysql['user_id'] = $db->real_escape_string($_SESSION['user_id']);
        $sql = "UPDATE 202_users_pref SET maxmind_isp='0' WHERE user_id='" . $mysql['user_id'] . "'";
        $result = _mysqli_query($sql);
    }
    die;
}
template_top('Administration', NULL, NULL, NULL);
$click_sql = "SELECT count(*) as clicks FROM 202_clicks";
$click_row = memcache_mysql_fetch_assoc($click_sql);
$clicks = $click_row['clicks'];
$click_sql = "SELECT count(*) clicks FROM 202_clicks_total";
$click_row = memcache_mysql_fetch_assoc($click_sql);
$clicks += $click_row['clicks'];
if (isset($_POST['database_management'])) {
    $tables = is_array($tables) ? $tables : explode(',', '202_clicks_advance,202_clicks_record,202_clicks_site,202_clicks_spy,202_clicks_tracking,202_clicks');
    $click_sql = "SELECT * FROM 202_clicks";
    $click_result = _mysqli_query($click_sql);
    $clicks = $click_result->num_rows;
    $click_count_sql = "UPDATE 202_clicks_total SET click_count=click_count+" . $clicks;
    $result = _mysqli_query($click_count_sql);
    $click_timestamp = strtotime($_POST['database_management']);
    foreach ($tables as $table) {
        if ($table != "202_clicks") {
            $click_sql = "DELETE FROM {$table}\n\t\t\t\t  WHERE click_id IN (\n\t            \t  \t\t\t\t\t\tSELECT click_id\n\t            \t  \t\t\t\t\t\tFROM 202_clicks\n\t            \t\t\t\t\t\t\tWHERE click_time <= {$click_timestamp}\n        \t\t\t\t\t\t\t)";
        } else {
            $click_sql = "DELETE FROM {$table} WHERE click_time <= {$click_timestamp}";
        }
开发者ID:viasmonster,项目名称:prosper202,代码行数:31,代码来源:administration.php


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