www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Please help

  1. #1
    Join Date
    Oct 2010
    Posts
    16

    Please help

    My website url = http://tinyurl.com/2wso6kl

    Im getting this error
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/revolut1/public_html/adsensesafetraffic/statistics_Adzmedia/php/get_site.php on line 16

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/revolut1/public_html/adsensesafetraffic/statistics_Adzmedia/index.php on line 121

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/revolut1/public_html/adsensesafetraffic/statistics_Adzmedia/index.php on line 133

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/revolut1/public_html/adsensesafetraffic/statistics_Adzmedia/index.php on line 135

    ===============================================
    these are lines of php where error is found

    while($field_get_site_info=mysql_fetch_array($r_get_site_info)){


    while($field=mysql_fetch_array($r)){


    $field_check=mysql_fetch_array($r_check);


    if(mysql_num_rows($r_check)){

  2. #2
    Join Date
    Apr 2008
    Posts
    171
    Please provide more snippits of your code, especially the query select statement(s).

  3. #3
    Join Date
    Oct 2010
    Posts
    16
    getsite.php code

    PHP Code:
    <?
    ##############################################################################################################
    ######################################### GETTING SITE INFORMATIONS FROM DATABSE #############################

    $q_get_site_info="select * from table_siteinfo where siteinfo_key='$_SESSION[CKL]' or siteinfo_key = 1 order by siteinfo_key";
    $r_get_site_info=make_query($q_get_site_info);

    /*
    if(mysql_num_rows($r_get_site_info)!=2){
        $CKL=1;
        $q_get_site_info="select * from table_siteinfo where siteinfo_key='$CKL' or siteinfo_key = 1 order by siteinfo_key";
        $r_get_site_info=make_query($q_get_site_info);
    }
    */

    while($field_get_site_info=mysql_fetch_array($r_get_site_info)){
        
        
        if(
    $field_get_site_info[siteinfo_key]==1){
            
            
    $PATH=$field_get_site_info[siteinfo_url];
            
    $ENCRYPT_KEY=$field_get_site_info[siteinfo_encrypt_key];
            
    $LOCALPATH=$field_get_site_info[siteinfo_localpath];
            
    $ERROR=$field_get_site_info[siteinfo_error];
            
    $REDIRECT_URL=$field_get_site_info[siteinfo_redirect_url];
            
    $REDIRECT_ENABLED=$field_get_site_info[siteinfo_redirect_enabled];
            
            
    $SITENAME=$field_get_site_info[siteinfo_name];
            
    $SUPPORT_ADDRESS=$field_get_site_info[siteinfo_support_email];
            
    $STYLE=$field_get_site_info[siteinfo_style];
            
    $REC_COUNT=$field_get_site_info[siteinfo_rec_count];
            
    $LOGO=$field_get_site_info[siteinfo_logo];
            
    $RESELLERPATH=$field_get_site_info[siteinfo_reseller_url];
            
    $MESSAGE=$field_get_site_info[siteinfo_message];
                
        }
        else{
            
    $SITENAME=$field_get_site_info[siteinfo_name];
            
    $SUPPORT_ADDRESS=$field_get_site_info[siteinfo_support_email];
            
    $STYLE=$field_get_site_info[siteinfo_style];
            
    $REC_COUNT=$field_get_site_info[siteinfo_rec_count];
            
    $LOGO=$field_get_site_info[siteinfo_logo];
            
    $RESELLERPATH=$field_get_site_info[siteinfo_reseller_url];
            
    $MESSAGE=$field_get_site_info[siteinfo_message];
            
        }
        
    }

    ?>
    index.php code
    PHP Code:
    <? error_reporting(E_ALL ^E_NOTICE);
    #phpinfo();
    #################################################################
    # Enterprise Traffic Server v3                                  #
    # Copyright 2002 TurnkeyTraffic.com                             #
    # This software MAY NOT be redistributed in ANY format.         #
    # You are licensed ONE copy of software for use on ONE website. #
    # Violaters will be prosecuted to the fullest extent of the law.#
    #################################################################

    ##############################################################################################################
    #################################### INCLUDING FUNCTIONS, CONNECTING AND GENERAL SETTINGS ###################

    include("config/config.inc.php");
    session_name ("TR_SK");
    session_start();
    connectdb();
    $call_tracker=0;

    ##############################################################################################################
    ############################################ FIXING MAGIC QUOTES ISSUE ###############################

    if (get_magic_quotes_gpc()) {
            
    // do nothing;
    }
    else{

            foreach(
    $_GET as $k=>$v){
                    
    $_GET[$k] = doaddslashes($v);
                    $
    $k $_GET[$k];
            }
            foreach(
    $_POST as $k=>$v){
                    
    $_POST[$k] = doaddslashes($v);
                    $
    $k $_POST[$k];
            }
            foreach(
    $_COOKIE as $k=>$v){
                    
    $_COOKIE[$k] = doaddslashes($v);
                    $
    $k $_COOKIE[$k];
            }       

            
    //echo get_magic_quotes_gpc();
            
    ini_set("magic_quotes_gpc",1);
            
    //echo get_magic_quotes_gpc();

    }

    ##############################################################################################################
    ############################################ CHECK TO SEE IF TRACKER IS CALLED ###############################
    if(preg_match("/TRCK=/",base64_decode($_SERVER['QUERY_STRING']))){
            
    $type="group";
            
    $call_tracker=1;
    }
    elseif(
    preg_match("/TRCKAD=/",base64_decode($_SERVER['QUERY_STRING']))){
            
    $type="ad";
            
    $call_tracker=1;
    }
    ##############################################################################################################
    ################################################### CALL THE TRACKER #########################################

    if($call_tracker==1){
            include(
    "php/tracker.php");
            exit;
    }

    ##############################################################################################################
    ####################################### SETTING SESSION FOR RESELLER USAGE ###################################

    if(isset($_SESSION['CKL']) || isset($_GET['logout'])){
            
    $_SESSION['CKL']='';
    }
    else{
            
    $_SESSION['CKL']=1;
    }

    ##############################################################################################################
    ################################################### GET SITE DATA ############################################

    include("php/get_site.php");

    ##############################################################################################################
    #####################  CHECKING SESSION VARIABLES AND GETTING USER DETAILS ###################################

    $id_sess $_SESSION['id_sess'];
    $user_sess $_SESSION['user_sess'];
    $pass_sess $_SESSION['pass_sess'];

    if(
    $id_sess){
            
    $q="select * from table_logins where logins_key='$id_sess'
                   and logins_username='
    $user_sess'
                   and logins_password = '
    $pass_sess'
                   and logins_active=1"
    ;
            
    $r=make_query($q);
            
    $MY=mysql_fetch_array($r);

            if(@
    mysql_num_rows($r) > 0){
                    
    $MY[ACCESS]=$MY[logins_type];
            } else {
                
    session_destroy();    
            }

    }
    else{
            
    $MY[ACCESS]=-1;
    }


    ##############################################################################################################
    ############################################# GETTING SITE MESSAGES FROM DATABASE ############################

    if(is_array(($_SESSION['SESSION_MSG'])) && sizeof($_SESSION['SESSION_MSG'])){
            foreach(
    $_SESSION['SESSION_MSG'] as $r=>$t){
                    
    $msg[$r]=$t;
            }
    }
    else{
            
    $q="select * from table_msg";
            
    $r=make_query($q);

            
    $_SESSION['SESSION_MSG']=array();

            while(
    $field=mysql_fetch_array($r)){
                    
    $msg[$field[msg_key]] = $field["msg_text"];
                    
    $_SESSION['SESSION_MSG'][$field[msg_key]]=$field["msg_text"];
            }
    }

    ##############################################################################################################
    $inl $_GET['inl'];
    if(!
    $inl){$inl="home";}

    $q_check="select * from table_access where access_page='$inl'";
    $r_check=make_query($q_check);
    $field_check=mysql_fetch_array($r_check);

    if(
    mysql_num_rows($r_check)){

            if(
    $field_check[access_title]){
                    
    $title=$field_check[access_title];
            }
            else{
                    
    $title=$SITENAME;
            }
            
    starting($title);

            if(
    $field_check[access_type] > $MY[ACCESS]){
                    if(
    $MY[ACCESS]){$err="admin_only";}
                    
    $inl="login";
            }

            include(
    "php/$inl.php");
            
    $xtpl->parse("mainpage.doublesection.$inl");
            
    $xtpl->parse("mainpage.doublesection");

            
    #########################
            
    ending();

    }
    ?>

  4. #4
    Join Date
    Oct 2010
    Posts
    16
    index.php code =
    PHP Code:
    <? error_reporting(E_ALL ^E_NOTICE);
    #phpinfo();
    #################################################################
    # Enterprise Traffic Server v3                                  #
    # Copyright 2002 TurnkeyTraffic.com                             #
    # This software MAY NOT be redistributed in ANY format.         #
    # You are licensed ONE copy of software for use on ONE website. #
    # Violaters will be prosecuted to the fullest extent of the law.#
    #################################################################

    ##############################################################################################################
    #################################### INCLUDING FUNCTIONS, CONNECTING AND GENERAL SETTINGS ###################

    include("config/config.inc.php");
    session_name ("TR_SK");
    session_start();
    connectdb();
    $call_tracker=0;

    ##############################################################################################################
    ############################################ FIXING MAGIC QUOTES ISSUE ###############################

    if (get_magic_quotes_gpc()) {
            
    // do nothing;
    }
    else{

            foreach(
    $_GET as $k=>$v){
                    
    $_GET[$k] = doaddslashes($v);
                    $
    $k $_GET[$k];
            }
            foreach(
    $_POST as $k=>$v){
                    
    $_POST[$k] = doaddslashes($v);
                    $
    $k $_POST[$k];
            }
            foreach(
    $_COOKIE as $k=>$v){
                    
    $_COOKIE[$k] = doaddslashes($v);
                    $
    $k $_COOKIE[$k];
            }       

            
    //echo get_magic_quotes_gpc();
            
    ini_set("magic_quotes_gpc",1);
            
    //echo get_magic_quotes_gpc();

    }

    ##############################################################################################################
    ############################################ CHECK TO SEE IF TRACKER IS CALLED ###############################
    if(preg_match("/TRCK=/",base64_decode($_SERVER['QUERY_STRING']))){
            
    $type="group";
            
    $call_tracker=1;
    }
    elseif(
    preg_match("/TRCKAD=/",base64_decode($_SERVER['QUERY_STRING']))){
            
    $type="ad";
            
    $call_tracker=1;
    }
    ##############################################################################################################
    ################################################### CALL THE TRACKER #########################################

    if($call_tracker==1){
            include(
    "php/tracker.php");
            exit;
    }

    ##############################################################################################################
    ####################################### SETTING SESSION FOR RESELLER USAGE ###################################

    if(isset($_SESSION['CKL']) || isset($_GET['logout'])){
            
    $_SESSION['CKL']='';
    }
    else{
            
    $_SESSION['CKL']=1;
    }

    ##############################################################################################################
    ################################################### GET SITE DATA ############################################

    include("php/get_site.php");

    ##############################################################################################################
    #####################  CHECKING SESSION VARIABLES AND GETTING USER DETAILS ###################################

    $id_sess $_SESSION['id_sess'];
    $user_sess $_SESSION['user_sess'];
    $pass_sess $_SESSION['pass_sess'];

    if(
    $id_sess){
            
    $q="select * from table_logins where logins_key='$id_sess'
                   and logins_username='
    $user_sess'
                   and logins_password = '
    $pass_sess'
                   and logins_active=1"
    ;
            
    $r=make_query($q);
            
    $MY=mysql_fetch_array($r);

            if(@
    mysql_num_rows($r) > 0){
                    
    $MY[ACCESS]=$MY[logins_type];
            } else {
                
    session_destroy();    
            }

    }
    else{
            
    $MY[ACCESS]=-1;
    }


    ##############################################################################################################
    ############################################# GETTING SITE MESSAGES FROM DATABASE ############################

    if(is_array(($_SESSION['SESSION_MSG'])) && sizeof($_SESSION['SESSION_MSG'])){
            foreach(
    $_SESSION['SESSION_MSG'] as $r=>$t){
                    
    $msg[$r]=$t;
            }
    }
    else{
            
    $q="select * from table_msg";
            
    $r=make_query($q);

            
    $_SESSION['SESSION_MSG']=array();

            while(
    $field=mysql_fetch_array($r)){
                    
    $msg[$field[msg_key]] = $field["msg_text"];
                    
    $_SESSION['SESSION_MSG'][$field[msg_key]]=$field["msg_text"];
            }
    }

    ##############################################################################################################
    $inl $_GET['inl'];
    if(!
    $inl){$inl="home";}

    $q_check="select * from table_access where access_page='$inl'";
    $r_check=make_query($q_check);
    $field_check=mysql_fetch_array($r_check);

    if(
    mysql_num_rows($r_check)){

            if(
    $field_check[access_title]){
                    
    $title=$field_check[access_title];
            }
            else{
                    
    $title=$SITENAME;
            }
            
    starting($title);

            if(
    $field_check[access_type] > $MY[ACCESS]){
                    if(
    $MY[ACCESS]){$err="admin_only";}
                    
    $inl="login";
            }

            include(
    "php/$inl.php");
            
    $xtpl->parse("mainpage.doublesection.$inl");
            
    $xtpl->parse("mainpage.doublesection");

            
    #########################
            
    ending();

    }
    ?>
    getsite.php code =
    PHP Code:
    <?
    ##############################################################################################################
    ######################################### GETTING SITE INFORMATIONS FROM DATABSE #############################

    $q_get_site_info="select * from table_siteinfo where siteinfo_key='$_SESSION[CKL]' or siteinfo_key = 1 order by siteinfo_key";
    $r_get_site_info=make_query($q_get_site_info);

    /*
    if(mysql_num_rows($r_get_site_info)!=2){
        $CKL=1;
        $q_get_site_info="select * from table_siteinfo where siteinfo_key='$CKL' or siteinfo_key = 1 order by siteinfo_key";
        $r_get_site_info=make_query($q_get_site_info);
    }
    */

    while($field_get_site_info=mysql_fetch_array($r_get_site_info)){
        
        
        if(
    $field_get_site_info[siteinfo_key]==1){
            
            
    $PATH=$field_get_site_info[siteinfo_url];
            
    $ENCRYPT_KEY=$field_get_site_info[siteinfo_encrypt_key];
            
    $LOCALPATH=$field_get_site_info[siteinfo_localpath];
            
    $ERROR=$field_get_site_info[siteinfo_error];
            
    $REDIRECT_URL=$field_get_site_info[siteinfo_redirect_url];
            
    $REDIRECT_ENABLED=$field_get_site_info[siteinfo_redirect_enabled];
            
            
    $SITENAME=$field_get_site_info[siteinfo_name];
            
    $SUPPORT_ADDRESS=$field_get_site_info[siteinfo_support_email];
            
    $STYLE=$field_get_site_info[siteinfo_style];
            
    $REC_COUNT=$field_get_site_info[siteinfo_rec_count];
            
    $LOGO=$field_get_site_info[siteinfo_logo];
            
    $RESELLERPATH=$field_get_site_info[siteinfo_reseller_url];
            
    $MESSAGE=$field_get_site_info[siteinfo_message];
                
        }
        else{
            
    $SITENAME=$field_get_site_info[siteinfo_name];
            
    $SUPPORT_ADDRESS=$field_get_site_info[siteinfo_support_email];
            
    $STYLE=$field_get_site_info[siteinfo_style];
            
    $REC_COUNT=$field_get_site_info[siteinfo_rec_count];
            
    $LOGO=$field_get_site_info[siteinfo_logo];
            
    $RESELLERPATH=$field_get_site_info[siteinfo_reseller_url];
            
    $MESSAGE=$field_get_site_info[siteinfo_message];
            
        }
        
    }

    ?>

  5. #5
    Join Date
    Apr 2008
    Posts
    171
    Quote Originally Posted by instant View Post
    getsite.php code

    PHP Code:
    <?
    ##############################################################################################################
    ######################################### GETTING SITE INFORMATIONS FROM DATABSE #############################

    $q_get_site_info="select * from table_siteinfo where siteinfo_key='$_SESSION[CKL]' or siteinfo_key = 1 order by siteinfo_key";
    $r_get_site_info=make_query($q_get_site_info);
    Show us a copy of your make_query() function. Is that where you are connecting to your database?

  6. #6
    Join Date
    Oct 2010
    Posts
    16
    config file is ,
    PHP Code:
    <?
    $user 
    "username";
    $password "password";
    $database "database";
    $location "location usually localhost";
    ?>

  7. #7
    Join Date
    Oct 2010
    Posts
    16
    if u need to see more php codes ,
    here is the complete script , please let me know how to fix the error
    http://rapidshare.com/files/427197873/statistics.zip

  8. #8
    Join Date
    Oct 2010
    Posts
    16
    sir please let me know if u need to see more php code ,
    i do not know why it is not running .

  9. #9
    Join Date
    Apr 2008
    Posts
    171
    Honestly, I am hesitant to download anything foreign (like this) for risk of damaging my machine.

    Can you extract and post your make_query() function? Just the part that does the connection to the database and the query selection.

    Then I can look at it and see if I am able to offer any assistance.

  10. #10
    Join Date
    Oct 2010
    Posts
    16
    i do not know what is make query function ? thats y i attached script file ,
    there is no virus in the script ,
    which page code should i paste here
    Quote Originally Posted by devel95 View Post
    Honestly, I am hesitant to download anything foreign (like this) for risk of damaging my machine.

    Can you extract and post your make_query() function? Just the part that does the connection to the database and the query selection.

    Then I can look at it and see if I am able to offer any assistance.

  11. #11
    Join Date
    Oct 2010
    Posts
    16
    this is config file that connects to database
    <?
    $user = "username";
    $password = "password";
    $database = "database";
    $location = "location usually localhost";
    ?>

  12. #12
    Join Date
    Oct 2010
    Posts
    16
    config.inc file
    PHP Code:
    <?
    ################################ DB CONNECTING ###############################################################
    function connectdb(){
        
        include 
    "config/dbconnect.inc.php";
        
    $conn=mysql_connect($location,$user,$password);
        echo 
    mysql_error();
        
    mysql_select_db($database,$conn);
        echo 
    mysql_error();
        if(
    mysql_error()){exit;}
    }

    ################################## CHECKS USER IN SESSION AND DATABASE AND REDIRECTS HIM #####################


    function redirect_user($TYPE=0){
        
        global 
    $cook_user,$id_sess;
        
    $ref=base64_encode("http://$_SERVER[SERVER_NAME]$_SERVER[PHP_SELF]?$_SERVER[QUERY_STRING]");
        
    $err="err2";
        
    header("Location: $PATH/?inl=login&".SID."&err=$err&ref=$ref");exit;
        
    }


    #############################################################################################################
    ########################################### SEND EMAIL ######################################################
    function send_email($recipient,$subject,$message){
        
        global 
    $SUPPORT_ADDRESS,$SITENAME,$PATH,$ADMIN,$STYLE,$LOGO,$RESELLERPATH;
        
        
    $subject=preg_replace("/{SITENAME}/",$SITENAME,$subject);
        
    $subject=preg_replace("/{SUPPORT_ADDRESS}/",$SUPPORT_ADDRESS,$subject);
        
    $subject=preg_replace("/{PATH}/",$PATH,$subject);
        
    $subject=preg_replace("/{LOGO}/",$LOGO,$subject);
        
    $subject=preg_replace("/{RESELLERPATH}/",$RESELLERPATH,$subject);
        
    $subject=preg_replace("/{ADMIN}/",$ADMIN,$subject);
        
        
    $message=preg_replace("/{SITENAME}/",$SITENAME,$message);
        
    $message=preg_replace("/{SUPPORT_ADDRESS}/",$SUPPORT_ADDRESS,$message);
        
    $message=preg_replace("/{PATH}/",$PATH,$message);
        
    $message=preg_replace("/{LOGO}/",$LOGO,$message);
        
    $message=preg_replace("/{RESELLERPATH}/",$RESELLERPATH,$message);
        
    $message=preg_replace("/{ADMIN}/",$ADMIN,$message);
        
        
    $headers .= "From: \"$SITENAME\" <$SUPPORT_ADDRESS>\n";
        
    $headers .= "X-Sender:\n";
        
    $headers .= "X-Mailer: PHP\n"// mailer
        
    $headers .= "Return-Path: $ADMIN\n";  // Return path for errors
        
    $headers .= "Content-Type: text/html; charset=iso-8859-1\n"// Mime type
        
        
    $message="<body><style type='text/css'>$STYLE</style>".$message;
        
    $message.="</body>";
        
        @
    mail($recipient$subject$message$headers);
        
    }


    #############################################################################################################
    ################### FUNCTIONS FOR BEGINING AND ENDING A PAGE (1 FOR MEMBER PAGES TO REDIRECT) ###############

    function starting($title=""){
        
        global 
    $xtpl,$PATH,$id_sess,$STYLE,$LOGO,$MESSAGE,$MY;
        require(
    "config/xtpl.p");
        
        
    // h4h
      
    if ($MY[ACCESS] == 2) {
        
    $xtpl=new XTemplate("template/main_a.html");
      } else {
        
    $xtpl=new XTemplate("template/main.html");
      }
        
    // h4h
        
        
    $xtpl->assign("TITLE",$title);
        
    $xtpl->assign("LOGO",$LOGO);
        
    $xtpl->assign("PATH",$PATH);
        
    $xtpl->assign("MESSAGE",$MESSAGE);
        
    $xtpl->assign("SID",SID);
        
    $xtpl->assign("ID_SESS",$id_sess);
        
    $xtpl->assign("style","$STYLE");
        
    $xtpl->assign("admintext","$field[messages_text] - $field[date]");
        
        if(
    $MY[ACCESS]==|| $MY[ACCESS]==2){
            
    $xtpl->parse("mainpage.topsection.is_logged_1_2.features_$MY[ACCESS]");
            if(
    $MY[ACCESS]==2)$xtpl->parse("mainpage.topsection.is_logged_1_2.groups");
            
    $xtpl->parse("mainpage.topsection.is_logged_1_2");
        }
        elseif(
    $MY[ACCESS]==0){
            
    $xtpl->parse("mainpage.topsection.is_logged_0");
        }
        
    $xtpl->parse("mainpage.topsection");
        
    }


    function 
    ending($sponsors=""){
        
        global 
    $xtpl,$id_sess,$LANG;
        
        
    $xtpl->parse("mainpage.botsection");
        
    $xtpl->parse("mainpage");
        
    $xtpl->out("mainpage");
        
    }

    #############################################################################################################
    ###################### MAKE A QUERY RETURN ERROR AND DIE; USED TO MAKE THE COUNT AS WELL ####################

    function make_query($query_content,$fields="",$if_count=0){
        
        global 
    $ERROR;
        
        
    $query_content=preg_replace("/##fields##/",$fields,$query_content);
        
        if(
    $if_count){
            
    $query_content=preg_replace("/limit \d+/i","limit 0",$query_content);#echo $query_content;
        
    }
        
        
    $query_content=preg_replace("/##/","",$query_content);
        
        
    $result=mysql_query($query_content);
        if(
    $ERROR=="on" && mysql_error()){
            die(
    "$query_content<br><br><b><font color=red>".mysql_error());
        }
        
    #echo "<br><br>\n\n$query_content\n\n<br><br>";
        
    return $result;
    }



    ####################### FIXING STRINGS #############################

    function fix_strings($var,$and_slashes=1){
        if(
    is_array($var)){
            foreach (
    $var as $i=>$v){
                if(
    $and_slashes)$var[$i]=stripslashes($var[$i]);
                
    $var[$i]=htmlentities($var[$i], ENT_QUOTES);#echo $arr[$i],"<br>";
            
    }
        }
        else{
            if(
    $and_slashes)$var=stripslashes($var);
            
    $var=htmlentities($varENT_QUOTES);#echo $var,"<br>";
        
    }
        return 
    $var;
    }

    #####################################################################
    #############################################################################################################

    function demo_out(){
        
        global 
    $MY,$PATH;
        
        if(
    $MY[logins_demo]){
            
    Header("Location: $PATH/?inl=messages&mess=17&".SID);exit;
        }
        
    }

    function 
    doaddslashes($VAR){
        if(
    is_array($VAR)){
            foreach(
    $VAR as $i=>$v){
                
    $VAR[$i]=doaddslashes($VAR[$i]);
            }
        }
        else{
            
    $VAR=addslashes($VAR);
        }
        
        return 
    $VAR;
    }

    ?>

  13. #13
    Join Date
    Apr 2008
    Posts
    171
    Ok, you got it...config.inc contains your make_query() function.

    I will try to take a look (and maybe other viewers will do the same) but it is nearing the end of my day here so I may need to revisit tomorrow.

    Not all it lost -- what you have just posted will enable "experienced" technicians to dig deeper to assist.

  14. #14
    Join Date
    Oct 2010
    Posts
    16
    can any one please look into my issue , i will be really thank ful to those who can help me

  15. #15
    Join Date
    Jan 2009
    Posts
    3,346
    $result=mysql_query($query_content);
    if($ERROR=="on" && mysql_error()){
    die("$query_content<br><br><b><font color=red>".mysql_error());
    }
    #echo "<br><br>\n\n$query_content\n\n<br><br>";
    return $result;
    You need to set "$ERROR=on;" wherever you are setting $ERROR. The message you are getting is because there is an error in your query and thus the "$result" is false instead of a result resource.

    The above could be simplified (though I recommend logging the error and gracefully exiting in production):
    PHP Code:
    $result=mysql_query($query_content); 
    if(!
    $result){ 
        die(
    "$query_content<br><br><b><font color=red>".mysql_error()); 
    } else {
        return 
    $result;


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles